2016-07-12 04:40:44 +08:00
|
|
|
; ; RUN: llc < %s -mtriple=i686-pc-linux -O0 | FileCheck %s
|
|
|
|
declare void @g(i32, i1)
|
|
|
|
|
|
|
|
;CHECK-LABEL: f:
|
|
|
|
;CHECK: cmpxchg8b
|
2018-10-30 04:10:42 +08:00
|
|
|
;CHECK: sete [[REG:%[abcd]l]]
|
|
|
|
;CHECK: movzbl [[REG]]
|
2016-07-12 04:40:44 +08:00
|
|
|
define void @f(i64* %arg, i64 %arg1) {
|
|
|
|
entry:
|
|
|
|
%tmp5 = cmpxchg i64* %arg, i64 %arg1, i64 %arg1 seq_cst seq_cst
|
|
|
|
%tmp7 = extractvalue { i64, i1 } %tmp5, 1
|
|
|
|
%tmp9 = zext i1 %tmp7 to i32
|
|
|
|
call void @g(i32 %tmp9, i1 %tmp7)
|
|
|
|
ret void
|
|
|
|
}
|