diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2015-05-11 06:37:03 +0000 |
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2015-05-11 06:37:03 +0000 |
| commit | f0d68d788b7ff79ffdd315db3b57b6c4e0f0de2b (patch) | |
| tree | 5dd781f583f2561cd14ea158d5780dc8768ae5e8 /llvm/test | |
| parent | 5b9ee1ba7e4d7d5a3ae0d6233b4cf26aa6c72647 (diff) | |
| download | bcm5719-llvm-f0d68d788b7ff79ffdd315db3b57b6c4e0f0de2b.tar.gz bcm5719-llvm-f0d68d788b7ff79ffdd315db3b57b6c4e0f0de2b.zip | |
[InstCombine/PowerPC] Fix single-precision QPX load/store replacement
The QPX single-precision load/store intrinsics have implied
truncation/extension from/to the declared value type of <4 x double> to the
memory type of <4 x float>. When we can prove the alignment of the pointer
argument, and thus replace the intrinsic with a regular load or store, we need
to load or store the correct data type (<4 x float>) instead of (<4 x double>).
llvm-svn: 236973
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/aligned-qpx.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/aligned-qpx.ll b/llvm/test/Transforms/InstCombine/aligned-qpx.ll index e303ddd17d5..e9710df5670 100644 --- a/llvm/test/Transforms/InstCombine/aligned-qpx.ll +++ b/llvm/test/Transforms/InstCombine/aligned-qpx.ll @@ -28,6 +28,7 @@ entry: ; CHECK-LABEL: @test1a ; CHECK-NOT: @llvm.ppc.qpx.qvlfs +; CHECK-NOT: load <4 x double> ; CHECK: ret <4 x double> %v0 = load <4 x float>, <4 x float>* %h, align 8 @@ -62,7 +63,9 @@ entry: ret <4 x float> %v0 ; CHECK-LABEL: @test2 +; CHECK: fptrunc <4 x double> %d to <4 x float> ; CHECK-NOT: @llvm.ppc.qpx.qvstfs +; CHECK-NOT: store <4 x double> ; CHECK: ret <4 x float> } |

