diff options
author | Cameron McInally <cameron.mcinally@nyu.edu> | 2019-05-17 16:47:00 +0000 |
---|---|---|
committer | Cameron McInally <cameron.mcinally@nyu.edu> | 2019-05-17 16:47:00 +0000 |
commit | 067e9468596a6e7a7f386558a0c1874aa1725f54 (patch) | |
tree | 66138978e1da229ea7466bc57b8c9715449c92ce /llvm/test/Transforms/InstSimplify/fast-math.ll | |
parent | 777cad2c448f964f80986c0427bbf36d021aba4f (diff) | |
download | bcm5719-llvm-067e9468596a6e7a7f386558a0c1874aa1725f54.tar.gz bcm5719-llvm-067e9468596a6e7a7f386558a0c1874aa1725f54.zip |
[InstSimplify] Add unary fneg to `fsub 0.0, (fneg X) ==> X` transform
Differential Revision: https://reviews.llvm.org/D62013
llvm-svn: 361047
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/fast-math.ll')
-rw-r--r-- | llvm/test/Transforms/InstSimplify/fast-math.ll | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/test/Transforms/InstSimplify/fast-math.ll b/llvm/test/Transforms/InstSimplify/fast-math.ll index bb0e3683c2a..a53d6ff6982 100644 --- a/llvm/test/Transforms/InstSimplify/fast-math.ll +++ b/llvm/test/Transforms/InstSimplify/fast-math.ll @@ -219,9 +219,7 @@ define float @fsub_0_0_x(float %a) { ; fsub nsz 0.0, (fneg X) ==> X define float @fneg_x(float %a) { ; CHECK-LABEL: @fneg_x( -; CHECK-NEXT: [[T1:%.*]] = fneg float [[A:%.*]] -; CHECK-NEXT: [[RET:%.*]] = fsub nsz float 0.000000e+00, [[T1]] -; CHECK-NEXT: ret float [[RET]] +; CHECK-NEXT: ret float [[A:%.*]] ; %t1 = fneg float %a %ret = fsub nsz float 0.0, %t1 @@ -239,9 +237,7 @@ define <2 x float> @fsub_0_0_x_vec_undef1(<2 x float> %a) { define <2 x float> @fneg_x_vec_undef1(<2 x float> %a) { ; CHECK-LABEL: @fneg_x_vec_undef1( -; CHECK-NEXT: [[T1:%.*]] = fneg <2 x float> [[A:%.*]] -; CHECK-NEXT: [[RET:%.*]] = fsub nsz <2 x float> <float 0.000000e+00, float undef>, [[T1]] -; CHECK-NEXT: ret <2 x float> [[RET]] +; CHECK-NEXT: ret <2 x float> [[A:%.*]] ; %t1 = fneg <2 x float> %a %ret = fsub nsz <2 x float> <float 0.0, float undef>, %t1 |