 Chromium Code Reviews
 Chromium Code Reviews 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
    
  
    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| 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 |