|
7 | 7 | ; CHECK-SPIRV: Constant [[Int]] [[MemScope_Device:[0-9]+]] 1
|
8 | 8 | ; CHECK-SPIRV: Constant [[Int]] [[MemSemEqual_SeqCst:[0-9]+]] 16
|
9 | 9 | ; CHECK-SPIRV: Constant [[Int]] [[MemSemUnequal_Acquire:[0-9]+]] 2
|
| 10 | +; CHECK-SPIRV: Constant [[Int]] [[Constant_456:[0-9]+]] 456 |
| 11 | +; CHECK-SPIRV: Constant [[Int]] [[Constant_128:[0-9]+]] 128 |
| 12 | +; CHECK-SPIRV: TypeBool [[Bool:[0-9]+]] |
| 13 | +; CHECK-SPIRV: TypeStruct [[Struct:[0-9]+]] [[Int]] [[Bool]] |
| 14 | +; CHECK-SPIRV: Undef [[Struct]] [[UndefStruct:[0-9]+]] |
10 | 15 |
|
11 | 16 | ; CHECK-SPIRV: FunctionParameter {{[0-9]+}} [[Pointer:[0-9]+]]
|
12 | 17 | ; CHECK-SPIRV: FunctionParameter {{[0-9]+}} [[Value_ptr:[0-9]+]]
|
@@ -40,6 +45,24 @@ cmpxchg.continue: ; preds = %cmpxchg.store_expec
|
40 | 45 | ret void
|
41 | 46 | }
|
42 | 47 |
|
| 48 | +; CHECK-SPIRV: FunctionParameter {{[0-9]+}} [[Ptr:[0-9]+]] |
| 49 | +; CHECK-SPIRV: FunctionParameter {{[0-9]+}} [[Store_ptr:[0-9]+]] |
| 50 | + |
| 51 | +; CHECK-SPIRV: AtomicCompareExchange [[Int]] [[Res_1:[0-9]+]] [[Ptr]] [[MemScope_Device]] |
| 52 | +; CHECK-SPIRV-SAME: [[MemSemEqual_SeqCst]] [[MemSemUnequal_Acquire]] [[Constant_456]] [[Constant_128]] |
| 53 | +; CHECK-SPIRV: IEqual {{[0-9]+}} [[Success_1:[0-9]+]] [[Res_1]] [[Constant_128]] |
| 54 | +; CHECK-SPIRV: CompositeInsert [[Struct]] [[Composite:[0-9]+]] [[Res_1]] [[UndefStruct]] 0 |
| 55 | +; CHECK-SPIRV: CompositeInsert [[Struct]] [[Composite_1:[0-9]+]] [[Success_1]] [[Composite]] 1 |
| 56 | +; CHECK-SPIRV: Store [[Store_ptr]] [[Composite_1]] |
| 57 | + |
| 58 | +; Function Attrs: nounwind |
| 59 | +define dso_local spir_func void @test2(i32* %ptr, {i32, i1}* %store_ptr) local_unnamed_addr #0 { |
| 60 | +entry: |
| 61 | + %0 = cmpxchg i32* %ptr, i32 128, i32 456 seq_cst acquire |
| 62 | + store { i32, i1 } %0, { i32, i1 }* %store_ptr, align 4 |
| 63 | + ret void |
| 64 | +} |
| 65 | + |
43 | 66 | attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
44 | 67 | attributes #1 = { nounwind }
|
45 | 68 |
|
|
0 commit comments