summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-03-01 18:24:05 +0000
committerPhilip Reames <listmail@philipreames.com>2019-03-01 18:24:05 +0000
commit1648f95eb15ddd6c9dd45e827c40577263259871 (patch)
treefe8fe44c64a4e3d0be325617f8569346d08b5b62
parentc7b322a3d96b85927e9a08396f93ccc34f5552bc (diff)
downloadbcm5719-llvm-1648f95eb15ddd6c9dd45e827c40577263259871.tar.gz
bcm5719-llvm-1648f95eb15ddd6c9dd45e827c40577263259871.zip
[Tests] More missing atomicrmw combines
llvm-svn: 355215
-rw-r--r--llvm/test/Transforms/InstCombine/atomicrmw.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/atomicrmw.ll b/llvm/test/Transforms/InstCombine/atomicrmw.ll
index 0e6c2bb7b45..e43d4a02c2b 100644
--- a/llvm/test/Transforms/InstCombine/atomicrmw.ll
+++ b/llvm/test/Transforms/InstCombine/atomicrmw.ll
@@ -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
+}
+
+
OpenPOWER on IntegriCloud