Index: tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll |
diff --git a/tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll b/tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll |
index 2051ffdd6f2eb58f1bfae01e25f3b4614de5cf3c..01a45711ac04a1e94abaddbc87a2b776b881bb31 100644 |
--- a/tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll |
+++ b/tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll |
@@ -1,11 +1,13 @@ |
; This tests the optimization of atomic cmpxchg w/ following cmp + branches. |
-; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s --check-prefix=O2 |
-; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s --check-prefix=OM1 |
; RUN: %llvm2ice -O2 --verbose none %s \ |
-; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
+; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
+; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ |
+; RUN: | FileCheck --check-prefix=O2 %s |
; RUN: %llvm2ice -Om1 --verbose none %s \ |
-; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
+; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
+; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ |
+; RUN: | FileCheck --check-prefix=OM1 %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 \ |
@@ -37,23 +39,23 @@ done: |
call void @use_value(i32 %old) |
ret i32 %succeeded_first_try |
} |
-; O2-LABEL: .Ltest_atomic_cmpxchg_loop{{.*}}loop |
-; O2: lock cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
+; O2-LABEL: test_atomic_cmpxchg_loop |
+; O2: lock |
+; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
; O2-NOT: cmp |
; Make sure the phi assignment for succeeded_first_try is still there. |
; O2: mov {{.*}}, 2 |
; O2-NOT: cmp |
; O2: je |
-; O2-LABEL: .Ltest_atomic_cmpxchg_loop{{.*}}done |
; Make sure the call isn't accidentally deleted. |
; O2: call |
; |
; Check that the unopt version does have a cmp |
-; OM1-LABEL: .Ltest_atomic_cmpxchg_loop{{.*}}loop |
-; OM1: lock cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
+; OM1-LABEL: test_atomic_cmpxchg_loop |
+; OM1: lock |
+; OM1-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
; OM1: cmp |
; OM1: je |
-; OM1-LABEL: .Ltest_atomic_cmpxchg_loop{{.*}}done |
; OM1: call |
; Still works if the compare operands are flipped. |
@@ -72,8 +74,9 @@ loop: |
done: |
ret i32 %old |
} |
-; O2-LABEL: .Ltest_atomic_cmpxchg_loop2{{.*}}loop |
-; O2: lock cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
+; O2-LABEL: test_atomic_cmpxchg_loop2 |
+; O2: lock |
+; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
; O2-NOT: cmp |
; O2: je |
@@ -94,8 +97,10 @@ loop: |
done: |
ret i32 %succeeded_first_try |
} |
-; O2-LABEL: .Ltest_atomic_cmpxchg_loop_const{{.*}}loop |
-; O2: lock cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
+; O2-LABEL: test_atomic_cmpxchg_loop_const |
+; O2: lock |
+; Should be using NEXT: see issue 3929 |
+; O2: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
; O2-NOT: cmp |
; O2: je |
@@ -116,8 +121,9 @@ loop: |
done: |
ret i32 %old |
} |
-; O2-LABEL: .Ltest_atomic_cmpxchg_no_opt{{.*}}loop |
-; O2: lock cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
+; O2-LABEL: test_atomic_cmpxchg_no_opt |
+; O2: lock |
+; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
; O2: mov {{.*}} |
; O2: cmp |
; O2: jg |
@@ -140,8 +146,9 @@ done: |
%r = zext i1 %success to i32 |
ret i32 %r |
} |
-; O2-LABEL: .Ltest_atomic_cmpxchg_no_opt2{{.*}}loop |
-; O2: lock cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
+; O2-LABEL: test_atomic_cmpxchg_no_opt2 |
+; O2: lock |
+; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} |
; O2: mov {{.*}} |
; O2: cmp |
; O2: je |