atomic.ll 326 B

123456789
  1. ; RUN: opt < %s -sccp -S | FileCheck %s
  2. define i1 @test_cmpxchg(i32* %addr, i32 %desired, i32 %new) {
  3. ; CHECK-LABEL: @test_cmpxchg
  4. ; CHECK: cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
  5. %val = cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
  6. %res = extractvalue { i32, i1 } %val, 1
  7. ret i1 %res
  8. }