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

Unified Diff: tests_lit/llvm2ice_tests/switch-opt.ll

Issue 511543002: Subzero: Fix some legalization issues involving immediates. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes, first round Created 6 years, 4 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 | « tests_lit/llvm2ice_tests/select-opt.ll ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests_lit/llvm2ice_tests/switch-opt.ll
diff --git a/tests_lit/llvm2ice_tests/switch-opt.ll b/tests_lit/llvm2ice_tests/switch-opt.ll
index 19187e4b3bbf5aa5af29949a62c114af96dad513..710879c5e7212d5ff5ef17e0256c90f4072e5fcc 100644
--- a/tests_lit/llvm2ice_tests/switch-opt.ll
+++ b/tests_lit/llvm2ice_tests/switch-opt.ll
@@ -37,6 +37,22 @@ sw.epilog: ; preds = %sw.bb2, %sw.default
ret i32 %result.1
}
+; Check for a valid addressing mode when the switch operand is an
+; immediate. It's important that there is exactly one case, because
+; for two or more cases the source operand is legalized into a
+; register.
+define i32 @testSwitchImm() {
+entry:
+ switch i32 10, label %sw.default [
+ i32 1, label %sw.default
+ ]
+
+sw.default:
+ ret i32 20
+}
+; CHECK-LABEL: testSwitchImm
+; CHECK-NOT: cmp {{[0-9]*}},
+
; CHECK-NOT: ICE translation error
; ERRORS-NOT: ICE translation error
; DUMP-NOT: SZ
« no previous file with comments | « tests_lit/llvm2ice_tests/select-opt.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698