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

Unified Diff: tests_lit/llvm2ice_tests/undef.ll

Issue 339783002: Add support for undef values in ICE IR. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 6 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
« src/IceTargetLoweringX8632.cpp ('K') | « src/llvm2ice.cpp ('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/undef.ll
diff --git a/tests_lit/llvm2ice_tests/undef.ll b/tests_lit/llvm2ice_tests/undef.ll
new file mode 100644
index 0000000000000000000000000000000000000000..bc4975ad2b960a4c93e85052156ada9d33455a8f
--- /dev/null
+++ b/tests_lit/llvm2ice_tests/undef.ll
@@ -0,0 +1,31 @@
+; This test checks that undef values are represented as registers.
+
+; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s
+; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=OPTM1 %s
+; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
+; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
+; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
+; RUN: | FileCheck --check-prefix=DUMP %s
+
+define i32 @return() {
Jim Stichnoth 2014/06/17 06:28:08 For both of these tests, add i64 and floating-poin
+entry:
+; CHECK: return:
jvoung (off chromium) 2014/06/17 15:50:11 Should we start using CHECK-LABEL more? http://ll
Jim Stichnoth 2014/06/17 17:51:12 I agree - most of the tests lack this simply becau
+; OPTM1: return:
+ ret i32 undef
+; CHECK-NOT: mov eax, dword ptr {{.*}}
+; OPTM1-NOT: mov eax, dword ptr {{.*}}
+; CHECK: ret
+; OPTM1: ret
+}
+
+define i32 @arith(i32 %arg) {
+entry:
+; CHECK: arith:
+ %__1 = add i32 undef, %arg
Jim Stichnoth 2014/06/17 06:28:08 I think it could be worthwhile to test undef as th
+; CHECK: add e{{[a-z]+}}, e{{[a-z]+}}
+ ret i32 %__1
+; CHECK: ret
+}
jvoung (off chromium) 2014/06/17 15:50:11 Sometimes function call arguments are "undef". In
wala 2014/06/17 20:00:19 There are a number of cases that could be optimize
+
+; ERRORS-NOT: ICE translation error
+; DUMP-NOT: SZ
« src/IceTargetLoweringX8632.cpp ('K') | « src/llvm2ice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698