diff options
| author | Owen Anderson <resistor@mac.com> | 2013-07-26 21:40:29 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2013-07-26 21:40:29 +0000 |
| commit | e37c2e4d11a4bbd34a7908774a12e4666687d087 (patch) | |
| tree | bef6bff29f7f2ca569775e295c92dda94d68098c /llvm/test/Transforms/InstCombine | |
| parent | 419f7c2345b7a2b553629e909ed29297bdeeb566 (diff) | |
| download | bcm5719-llvm-e37c2e4d11a4bbd34a7908774a12e4666687d087.tar.gz bcm5719-llvm-e37c2e4d11a4bbd34a7908774a12e4666687d087.zip | |
When InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
also worthwhile for it to look through FP extensions and truncations, whose
application commutes with fneg.
llvm-svn: 187249
Diffstat (limited to 'llvm/test/Transforms/InstCombine')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/fneg-ext.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/fneg-ext.ll b/llvm/test/Transforms/InstCombine/fneg-ext.ll new file mode 100644 index 00000000000..49ad2325261 --- /dev/null +++ b/llvm/test/Transforms/InstCombine/fneg-ext.ll @@ -0,0 +1,12 @@ +; RUN: opt -instcombine -S < %s | FileCheck %s + +; CHECK: test1 +define double @test1(float %a, double %b) nounwind readnone ssp uwtable { +; CHECK-NOT: fsub +; CHECK: fpext +; CHECK: fadd + %1 = fsub float -0.000000e+00, %a + %2 = fpext float %1 to double + %3 = fsub double %b, %2 + ret double %3 +} |

