summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-08-07 20:32:55 +0000
committerSanjay Patel <spatel@rotateright.com>2018-08-07 20:32:55 +0000
commit9b073470334adfedfe265728382c7c5e07af319b (patch)
treed21cfac23e718e35eb5e341d9746a89938abdd37 /llvm/test
parent3e7b9db2d9943eadc953500c995919a8168cd56a (diff)
downloadbcm5719-llvm-9b073470334adfedfe265728382c7c5e07af319b.tar.gz
bcm5719-llvm-9b073470334adfedfe265728382c7c5e07af319b.zip
[InstSimplify] fold fsub+fadd with common operand
llvm-svn: 339176
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll b/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
index 9c139d38621..305e508480f 100644
--- a/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
+++ b/llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
@@ -849,9 +849,7 @@ define float @fadd_fsub_common_op_wrong_commute_commute(float %x, float %y) {
define <2 x float> @fsub_fadd_common_op_vec(<2 x float> %x, <2 x float> %y) {
; CHECK-LABEL: @fsub_fadd_common_op_vec(
-; CHECK-NEXT: [[S:%.*]] = fsub <2 x float> [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[R:%.*]] = fadd reassoc nsz <2 x float> [[Y]], [[S]]
-; CHECK-NEXT: ret <2 x float> [[R]]
+; CHECK-NEXT: ret <2 x float> [[X:%.*]]
;
%s = fsub <2 x float> %x, %y
%r = fadd reassoc nsz <2 x float> %y, %s
@@ -862,9 +860,7 @@ define <2 x float> @fsub_fadd_common_op_vec(<2 x float> %x, <2 x float> %y) {
define float @fsub_fadd_common_op_commute(float %x, float %y) {
; CHECK-LABEL: @fsub_fadd_common_op_commute(
-; CHECK-NEXT: [[S:%.*]] = fsub float [[X:%.*]], [[Y:%.*]]
-; CHECK-NEXT: [[R:%.*]] = fadd reassoc nsz float [[S]], [[Y]]
-; CHECK-NEXT: ret float [[R]]
+; CHECK-NEXT: ret float [[X:%.*]]
;
%s = fsub float %x, %y
%r = fadd reassoc nsz float %s, %y
OpenPOWER on IntegriCloud