aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/SCCP/atomic.ll
blob: 60d4896ec2b0223b7fcc4883e79a3dad1da11d16 (plain)
1
2
3
4
5
6
7
8
9
; RUN: opt < %s -sccp -S | FileCheck %s

define i1 @test_cmpxchg(i32* %addr, i32 %desired, i32 %new) {
; CHECK-LABEL: @test_cmpxchg
; CHECK: cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
  %val = cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
  %res = extractvalue { i32, i1 } %val, 1
  ret i1 %res
}