[llvm] r218341 - Fix swift-atomics testcase
Robin Morisset
morisset at google.com
Tue Sep 23 16:18:01 PDT 2014
Author: morisset
Date: Tue Sep 23 18:18:01 2014
New Revision: 218341
URL: http://llvm.org/viewvc/llvm-project?rev=218341&view=rev
Log:
Fix swift-atomics testcase
This testcase was not testing what it meant: because there were only two checks for
dmb {{ish}} in the second function, it could have missed a bug where one of the three
required dmb {{ish}} became dmb {{ishst}}. As I was fixing it, I also added
CHECK-LABELs to make it a bit less brittle.
Modified:
llvm/trunk/test/CodeGen/ARM/swift-atomics.ll
Modified: llvm/trunk/test/CodeGen/ARM/swift-atomics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/swift-atomics.ll?rev=218341&r1=218340&r2=218341&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/swift-atomics.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/swift-atomics.ll Tue Sep 23 18:18:01 2014
@@ -8,6 +8,7 @@ define void @test_store_release(i32* %p,
; CHECK: dmb ishst
; CHECK: str
+; CHECK-STRICT-ATOMIC-LABEL: test_store_release:
; CHECK-STRICT-ATOMIC: dmb {{ish$}}
store atomic i32 %v, i32* %p release, align 4
ret void
@@ -24,7 +25,11 @@ define i32 @test_seq_cst(i32* %p, i32 %v
; CHECK: ldr
; CHECK: dmb {{ish$}}
+; CHECK-STRICT-ATOMIC-LABEL: test_seq_cst:
; CHECK-STRICT-ATOMIC: dmb {{ish$}}
+; CHECK-STRICT-ATOMIC: str
+; CHECK-STRICT-ATOMIC: dmb {{ish$}}
+; CHECK-STRICT-ATOMIC: ldr
; CHECK-STRICT-ATOMIC: dmb {{ish$}}
store atomic i32 %v, i32* %p seq_cst, align 4
@@ -39,6 +44,7 @@ define i32 @test_acq(i32* %addr) {
; CHECK: ldr
; CHECK: dmb {{ish$}}
+; CHECK-STRICT-ATOMIC-LABEL: test_acq:
; CHECK-STRICT-ATOMIC: dmb {{ish$}}
%val = load atomic i32* %addr acquire, align 4
ret i32 %val
More information about the llvm-commits
mailing list