Chromium Code Reviews| Index: tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll |
| diff --git a/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll b/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll |
| index 8b2a9440d3b216cb2dd339d5e5d8f5a32f346521..bf7afc66cbbfef600e74d4c8e69647f5d82207ce 100644 |
| --- a/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll |
| +++ b/tests_lit/llvm2ice_tests/nacl-other-intrinsics.ll |
| @@ -1,12 +1,19 @@ |
| ; This tests the NaCl intrinsics not related to atomic operations. |
| -; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
| -; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s |
| +; RUN: %llvm2ice -O2 --verbose none -sandbox %s | FileCheck %s |
| +; RUN: %llvm2ice -Om1 --verbose none -sandbox %s | FileCheck %s |
| ; Do another run w/ O2 and a different check-prefix (otherwise O2 and Om1 |
| ; share the same "CHECK" prefix). This separate run helps check that |
| ; some code is optimized out. |
| -; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=CHECKO2REM |
| +; RUN: %llvm2ice -O2 --verbose none -sandbox %s \ |
| +; RUN: | FileCheck %s --check-prefix=CHECKO2REM |
| + |
| +; Do O2 runs without -sandbox to make sure llvm.nacl.read.tp gets |
| +; lowered to __nacl_read_tp instead of gs:[0x0]. |
| +; RUN: %llvm2ice -O2 --verbose none %s | FileCheck --check-prefix=CHECKO2U %s |
| +; RUN: %llvm2ice -O2 --verbose none %s \ |
| +; RUN: | FileCheck --check-prefix=CHECKO2UREM %s |
| ; RUN: %llvm2ice -O2 --verbose none %s \ |
| ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
| @@ -48,6 +55,10 @@ entry: |
| ; CHECK: mov e{{.*}}, dword ptr gs:[0] |
| ; CHECKO2REM-LABEL: test_nacl_read_tp |
| ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] |
| +; CHECKO2U-LABEL: test_nacl_read_tp |
| +; CHECKO2U: call __nacl_read_tp |
| +; CHECKO2UREM-LABEL: test_nacl_read_tp |
| +; CHECKO2UREM: call __nacl_read_tp |
| define i32 @test_nacl_read_tp_more_addressing() { |
| entry: |
| @@ -69,6 +80,12 @@ entry: |
| ; CHECKO2REM-LABEL: test_nacl_read_tp_more_addressing |
| ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] |
| ; CHECKO2REM: mov e{{.*}}, dword ptr gs:[0] |
| +; CHECKO2U-LABEL: test_nacl_read_tp_more_addressing |
| +; CHECKO2U: call __nacl_read_tp |
| +; CHECKO2U: call __nacl_read_tp |
| +; CHECKO2UREM-LABEL: test_nacl_read_tp_more_addressing |
| +; CHECKO2UREM: call __nacl_read_tp |
| +; CHECKO2UREM: call __nacl_read_tp |
| define i32 @test_nacl_read_tp_dead(i32 %a) { |
| entry: |
| @@ -80,6 +97,8 @@ entry: |
| ; Consider nacl.read.tp side-effect free, so it can be eliminated. |
| ; CHECKO2REM-LABEL: test_nacl_read_tp_dead |
| ; CHECKO2REM-NOT: mov e{{.*}}, dword ptr gs:[0] |
| +; CHECKO2UREM-LABEL: test_nacl_read_tp_dead |
| +; CHECKO2UREM-NOT: call __nacl_read_tp |
| define void @test_memcpy(i32 %iptr_dst, i32 %iptr_src, i32 %len) { |
| entry: |
| @@ -91,6 +110,7 @@ entry: |
| } |
| ; CHECK-LABEL: test_memcpy |
| ; CHECK: call memcpy |
| +; CHECKO2UREM-LABEL: test_memcpy |
|
jvoung (off chromium)
2014/08/25 21:01:34
I guess I should have added a CHECKO2REM-LABEL her
Jim Stichnoth
2014/08/25 21:32:09
Ah right, I went ahead and added that.
Also, fixe
|
| ; TODO(jvoung) -- if we want to be clever, we can do this and the memmove, |
| ; memset without a function call. |