summaryrefslogtreecommitdiff
path: root/test/Analysis
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-03-15 15:10:47 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-03-15 15:10:47 +0000
commitc0d8dc0eb6e1df872affadba01f60e42275e2863 (patch)
tree3284e2b462ab58cdaf27aa6baaaee87d7ec7e50f /test/Analysis
parent044f841267139c25240d93d5bf6b862d473cefd5 (diff)
downloadllvm-c0d8dc0eb6e1df872affadba01f60e42275e2863.tar.gz
llvm-c0d8dc0eb6e1df872affadba01f60e42275e2863.tar.bz2
llvm-c0d8dc0eb6e1df872affadba01f60e42275e2863.tar.xz
ARM cost model: Fix cost of fptrunc and fpext instructions
A vector fptrunc and fpext simply gets split into scalar instructions. radar://13192358 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
-rw-r--r--test/Analysis/CostModel/ARM/cast.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Analysis/CostModel/ARM/cast.ll b/test/Analysis/CostModel/ARM/cast.ll
index 779c4384e8..2b58f6ce38 100644
--- a/test/Analysis/CostModel/ARM/cast.ll
+++ b/test/Analysis/CostModel/ARM/cast.ll
@@ -166,6 +166,30 @@ define i32 @casts() {
; CHECK: cost of 38 {{.*}} trunc
%r75 = trunc <16 x i32> undef to <16 x i8>
+ ; Floating point truncation costs.
+ ; CHECK: cost of 1 {{.*}} fptrunc double
+ %r80 = fptrunc double undef to float
+ ; CHECK: cost of 2 {{.*}} fptrunc <2 x double
+ %r81 = fptrunc <2 x double> undef to <2 x float>
+ ; CHECK: cost of 4 {{.*}} fptrunc <4 x double
+ %r82 = fptrunc <4 x double> undef to <4 x float>
+ ; CHECK: cost of 8 {{.*}} fptrunc <8 x double
+ %r83 = fptrunc <8 x double> undef to <8 x float>
+ ; CHECK: cost of 16 {{.*}} fptrunc <16 x double
+ %r84 = fptrunc <16 x double> undef to <16 x float>
+
+ ; Floating point extension costs.
+ ; CHECK: cost of 1 {{.*}} fpext float
+ %r85 = fpext float undef to double
+ ; CHECK: cost of 2 {{.*}} fpext <2 x float
+ %r86 = fpext <2 x float> undef to <2 x double>
+ ; CHECK: cost of 4 {{.*}} fpext <4 x float
+ %r87 = fpext <4 x float> undef to <4 x double>
+ ; CHECK: cost of 8 {{.*}} fpext <8 x float
+ %r88 = fpext <8 x float> undef to <8 x double>
+ ; CHECK: cost of 16 {{.*}} fpext <16 x float
+ %r89 = fpext <16 x float> undef to <16 x double>
+
;CHECK: cost of 0 {{.*}} ret
ret i32 undef
}