Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: tests_lit/llvm2ice_tests/8bit.pnacl.ll

Issue 1152783006: Subzero: Fold the load instruction into the next cast instruction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/load_cast.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/8bit.pnacl.ll
diff --git a/tests_lit/llvm2ice_tests/8bit.pnacl.ll b/tests_lit/llvm2ice_tests/8bit.pnacl.ll
index 4987a1d5cfdc1269958abc7eb8630a2ea0ef9335..81db96d7f8ed0a5b55142f3105b81d1530767285 100644
--- a/tests_lit/llvm2ice_tests/8bit.pnacl.ll
+++ b/tests_lit/llvm2ice_tests/8bit.pnacl.ll
@@ -335,7 +335,8 @@ define i32 @load_i8(i32 %addr_arg) {
entry:
%addr = inttoptr i32 %addr_arg to i8*
%ret = load i8* %addr, align 1
- %ret_ext = zext i8 %ret to i32
+ %ret2 = sub i8 %ret, 0
+ %ret_ext = zext i8 %ret2 to i32
ret i32 %ret_ext
}
; CHECK-LABEL: load_i8
@@ -345,7 +346,8 @@ define i32 @load_i8_global(i32 %addr_arg) {
entry:
%addr = bitcast [1 x i8]* @global8 to i8*
%ret = load i8* %addr, align 1
- %ret_ext = zext i8 %ret to i32
+ %ret2 = sub i8 %ret, 0
+ %ret_ext = zext i8 %ret2 to i32
ret i32 %ret_ext
}
; CHECK-LABEL: load_i8_global
« no previous file with comments | « src/IceTargetLoweringX8632.cpp ('k') | tests_lit/llvm2ice_tests/load_cast.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698