Nicolai Haehnle | 79cad85 | 2016-03-17 16:21:59 +0000 | [diff] [blame] | 1 | ; RUN: opt -mtriple=amdgcn-- -analyze -divergence %s | FileCheck %s |
| 2 | |
| 3 | ; CHECK: DIVERGENT: %orig = atomicrmw xchg i32* %ptr, i32 %val seq_cst |
| 4 | define i32 @test1(i32* %ptr, i32 %val) #0 { |
| 5 | %orig = atomicrmw xchg i32* %ptr, i32 %val seq_cst |
| 6 | ret i32 %orig |
| 7 | } |
| 8 | |
| 9 | ; CHECK: DIVERGENT: %orig = cmpxchg i32* %ptr, i32 %cmp, i32 %new seq_cst seq_cst |
| 10 | define {i32, i1} @test2(i32* %ptr, i32 %cmp, i32 %new) { |
| 11 | %orig = cmpxchg i32* %ptr, i32 %cmp, i32 %new seq_cst seq_cst |
| 12 | ret {i32, i1} %orig |
| 13 | } |
| 14 | |
Matt Arsenault | b34eea9 | 2016-04-13 00:39:48 +0000 | [diff] [blame] | 15 | attributes #0 = { nounwind } |