[Tests] More missing atomicrmw combines

llvm-svn: 355215
This commit is contained in:
Philip Reames 2019-03-01 18:24:05 +00:00
parent c7b322a3d9
commit 1648f95eb1
1 changed files with 25 additions and 0 deletions

View File

@ -229,6 +229,14 @@ define double @sat_fsub_nan(double* %addr) {
ret double %res
}
; CHECK-LABEL: sat_fsub_nan_unused
; CHECK-NEXT: atomicrmw fsub double* %addr, double 0x7FF00000FFFFFFFF monotonic
; CHECK-NEXT: ret void
define void @sat_fsub_nan_unused(double* %addr) {
atomicrmw fsub double* %addr, double 0x7FF00000FFFFFFFF monotonic
ret void
}
; CHECK-LABEL: xchg_unused_monotonic
; CHECK-NEXT: store atomic i32 0, i32* %addr monotonic, align 4
; CHECK-NEXT: ret void
@ -270,4 +278,21 @@ define void @sat_or_allones_unused(i32* %addr) {
}
; CHECK-LABEL: undef_operand_unused
; CHECK-NEXT: atomicrmw or i32* %addr, i32 undef monotonic
; CHECK-NEXT: ret void
define void @undef_operand_unused(i32* %addr) {
atomicrmw or i32* %addr, i32 undef monotonic
ret void
}
; CHECK-LABEL: undef_operand_used
; CHECK-NEXT: %res = atomicrmw or i32* %addr, i32 undef monotonic
; CHECK-NEXT: ret i32 %res
define i32 @undef_operand_used(i32* %addr) {
%res = atomicrmw or i32* %addr, i32 undef monotonic
ret i32 %res
}