summaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2013-03-19 08:15:38 +0000
committerRenato Golin <renato.golin@linaro.org>2013-03-19 08:15:38 +0000
commit5ad5f5931e34d5be410b1e901640bc1c2d308612 (patch)
tree4cb257e7333a6d8337a30fc6ca7aeec8e54b3713 /test/Analysis
parent54e57f8cb79bdc23ed8289cf2a558fa7c9602972 (diff)
downloadllvm-5ad5f5931e34d5be410b1e901640bc1c2d308612.tar.gz
llvm-5ad5f5931e34d5be410b1e901640bc1c2d308612.tar.bz2
llvm-5ad5f5931e34d5be410b1e901640bc1c2d308612.tar.xz
Improve long vector sext/zext lowering on ARM
The ARM backend currently has poor codegen for long sext/zext operations, such as v8i8 -> v8i32. This patch addresses this by performing a custom expansion in ARMISelLowering. It also adds/changes the cost of such lowering in ARMTTI. This partially addresses PR14867. Patch by Pete Couperus git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/CostModel/ARM/cast.ll24
1 files changed, 19 insertions, 5 deletions
diff --git a/test/Analysis/CostModel/ARM/cast.ll b/test/Analysis/CostModel/ARM/cast.ll
index 96eb33564f..ba9d84cf3e 100644
--- a/test/Analysis/CostModel/ARM/cast.ll
+++ b/test/Analysis/CostModel/ARM/cast.ll
@@ -152,15 +152,29 @@ define i32 @casts() {
; CHECK: cost of 10 {{.*}} uitofp
%r69 = uitofp i64 undef to double
- ; Vector cast cost of instructions lowering the cast to the stack.
- ; CHECK: cost of 24 {{.*}} sext
+ ; CHECK: cost of 3 {{.*}} sext
%r70 = sext <8 x i8> undef to <8 x i32>
- ; CHECK: cost of 48 {{.*}} sext
+ ; CHECK: cost of 6 {{.*}} sext
%r71 = sext <16 x i8> undef to <16 x i32>
- ; CHECK: cost of 22 {{.*}} zext
+ ; CHECK: cost of 3 {{.*}} zext
%r72 = zext <8 x i8> undef to <8 x i32>
- ; CHECK: cost of 44 {{.*}} zext
+ ; CHECK: cost of 6 {{.*}} zext
%r73 = zext <16 x i8> undef to <16 x i32>
+
+ ; CHECK: cost of 7 {{.*}} sext
+ %rext_0 = sext <8 x i8> undef to <8 x i64>
+ ; CHECK: cost of 7 {{.*}} zext
+ %rext_1 = zext <8 x i8> undef to <8 x i64>
+ ; CHECK: cost of 6 {{.*}} sext
+ %rext_2 = sext <8 x i16> undef to <8 x i64>
+ ; CHECK: cost of 6 {{.*}} zext
+ %rext_3 = zext <8 x i16> undef to <8 x i64>
+ ; CHECK: cost of 3 {{.*}} sext
+ %rext_4 = sext <4 x i16> undef to <4 x i64>
+ ; CHECK: cost of 3 {{.*}} zext
+ %rext_5 = zext <4 x i16> undef to <4 x i64>
+
+ ; Vector cast cost of instructions lowering the cast to the stack.
; CHECK: cost of 19 {{.*}} trunc
%r74 = trunc <8 x i32> undef to <8 x i8>
; CHECK: cost of 38 {{.*}} trunc