summaryrefslogtreecommitdiff
path: root/test/Analysis/CostModel
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-03-15 18:31:01 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-03-15 18:31:01 +0000
commit5193e4ebe216dd5a07ab9cc58d40de5aafaa990c (patch)
treeaf0fd56a4789a5e950a4ffaf8f62ff0d0ea5ff3e /test/Analysis/CostModel
parentbcbf3fddef46f1f6e2f2408064c4b75e4b6c90f5 (diff)
downloadllvm-5193e4ebe216dd5a07ab9cc58d40de5aafaa990c.tar.gz
llvm-5193e4ebe216dd5a07ab9cc58d40de5aafaa990c.tar.bz2
llvm-5193e4ebe216dd5a07ab9cc58d40de5aafaa990c.tar.xz
ARM cost model: Fix costs for some vector selects
I was too pessimistic in r177105. Vector selects that fit into a legal register type lower just fine. I was mislead by the code fragment that I was using. The stores/loads that I saw in those cases came from lowering the conditional off an address. Changing the code fragment to: %T0_3 = type <8 x i18> %T1_3 = type <8 x i1> define void @func_blend3(%T0_3* %loadaddr, %T0_3* %loadaddr2, %T1_3* %blend, %T0_3* %storeaddr) { %v0 = load %T0_3* %loadaddr %v1 = load %T0_3* %loadaddr2 ==> FROM: ;%c = load %T1_3* %blend ==> TO: %c = icmp slt %T0_3 %v0, %v1 ==> USE: %r = select %T1_3 %c, %T0_3 %v0, %T0_3 %v1 store %T0_3 %r, %T0_3* %storeaddr ret void } revealed this mistake. radar://13403975 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/CostModel')
-rw-r--r--test/Analysis/CostModel/ARM/select.ll10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/Analysis/CostModel/ARM/select.ll b/test/Analysis/CostModel/ARM/select.ll
index 23cee9a576..34ed1eefda 100644
--- a/test/Analysis/CostModel/ARM/select.ll
+++ b/test/Analysis/CostModel/ARM/select.ll
@@ -21,18 +21,18 @@ define void @casts() {
; Vector values
; CHECK: cost of 1 {{.*}} select
%v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef
- ; CHECK: cost of 10 {{.*}} select
+ ; CHECK: cost of 1 {{.*}} select
%v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef
- ; CHECK: cost of 17 {{.*}} select
+ ; CHECK: cost of 1 {{.*}} select
%v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef
- ; CHECK: cost of 33 {{.*}} select
+ ; CHECK: cost of 1 {{.*}} select
%v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef
; CHECK: cost of 1 {{.*}} select
%v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef
- ; CHECK: cost of 9 {{.*}} select
+ ; CHECK: cost of 1 {{.*}} select
%v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef
- ; CHECK: cost of 17 {{.*}} select
+ ; CHECK: cost of 1 {{.*}} select
%v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef
; CHECK: cost of 40 {{.*}} select
%v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef