diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-01-18 16:43:14 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-01-18 16:43:14 +0000 |
commit | 8e937c39bb389e9aeb92467b99e76373bf547bab (patch) | |
tree | 0abf27aeace1eb1ff1b92912ae00a16fdc1a5006 /test/Transforms/InstCombine | |
parent | bedf842b78d00dc481a83edf7f1a3ca5f21a3805 (diff) | |
download | llvm-8e937c39bb389e9aeb92467b99e76373bf547bab.tar.gz llvm-8e937c39bb389e9aeb92467b99e76373bf547bab.tar.bz2 llvm-8e937c39bb389e9aeb92467b99e76373bf547bab.tar.xz |
InstCombine: Make the (fmul X, -1.0) -> (fsub -0.0, X) transform handle vectors too.
PR18532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r-- | test/Transforms/InstCombine/fmul.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/fmul.ll b/test/Transforms/InstCombine/fmul.ll index 0b4a90d88f..fdfc8df0a2 100644 --- a/test/Transforms/InstCombine/fmul.ll +++ b/test/Transforms/InstCombine/fmul.ll @@ -104,3 +104,12 @@ define float @test9(float %x) { ; CHECK: fsub } +; PR18532 +define <4 x float> @test10(<4 x float> %x) { + %mul = fmul <4 x float> %x, <float -1.0, float -1.0, float -1.0, float -1.0> + ret <4 x float> %mul + +; CHECK-LABEL: @test10( +; CHECK-NOT: fmul +; CHECK: fsub +} |