Index: tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll |
diff --git a/tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll b/tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll |
index a852e87161845ff6352d584295731f9d89e59cf6..8ea72d9bbc7ec5499231fb3c4eb258f064743614 100644 |
--- a/tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll |
+++ b/tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll |
@@ -2,7 +2,7 @@ |
; size allowed. |
; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
-; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=CHECKO2REM |
+; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=CHECKO2 |
; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s |
; RUN: %llvm2ice -O2 --verbose none %s \ |
; RUN: | llvm-mc -arch=x86 -x86-asm-syntax=intel -filetype=obj |
@@ -88,6 +88,9 @@ entry: |
define i32 @test_atomic_load_32_with_arith(i32 %iptr) { |
entry: |
+ br label %next |
+ |
+next: |
%ptr = inttoptr i32 %iptr to i32* |
%r = call i32 @llvm.nacl.atomic.load.i32(i32* %ptr, i32 6) |
%r2 = add i32 %r, 32 |
@@ -96,6 +99,11 @@ entry: |
; CHECK-LABEL: test_atomic_load_32_with_arith |
; CHECK: mov {{.*}}, dword |
; The next instruction may be a separate load or folded into an add. |
+; |
+; In O2 mode, we know that the load and add are going to be fused. |
+; CHECKO2-LABEL: test_atomic_load_32_with_arith |
+; CHECKO2: mov {{.*}}, dword |
+; CHECKO2: add {{.*}}, dword |
define i32 @test_atomic_load_32_ignored(i32 %iptr) { |
entry: |
@@ -106,6 +114,9 @@ entry: |
; CHECK-LABEL: test_atomic_load_32_ignored |
; CHECK: mov {{.*}}, dword |
; CHECK: mov {{.*}}, dword |
+; CHECKO2-LABEL: test_atomic_load_32_ignored |
+; CHECKO2: mov {{.*}}, dword |
+; CHECKO2: mov {{.*}}, dword |
define i64 @test_atomic_load_64_ignored(i32 %iptr) { |
entry: |
@@ -879,9 +890,9 @@ entry: |
; CHECK-LABEL: test_atomic_is_lock_free_ignored |
; CHECK: mov {{.*}}, 0 |
; This can get optimized out, because it's side-effect-free. |
-; CHECKO2REM-LABEL: test_atomic_is_lock_free_ignored |
-; CHECKO2REM-NOT: mov {{.*}}, 1 |
-; CHECKO2REM: mov {{.*}}, 0 |
+; CHECKO2-LABEL: test_atomic_is_lock_free_ignored |
+; CHECKO2-NOT: mov {{.*}}, 1 |
+; CHECKO2: mov {{.*}}, 0 |
; TODO(jvoung): at some point we can take advantage of the |
; fact that nacl.atomic.is.lock.free will resolve to a constant |