[PATCH] D155876: [PowerPC] vector cost model add cost to extract i1
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 20:40:03 PDT 2023
shchenz added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp:738
+ return 3 + MaskCost;
+ }
}
----------------
I must miss something. I compile following cases:
```
define i1 @ext_ext_or_reduction_v4i1(<4 x i1> %z) {
%z1 = extractelement <4 x i1> %z, i32 1
ret i1 %z1
}
```
```
define i32 @ext_ext_or_reduction_v4i32(<4 x i32> %z) {
%z1 = extractelement <4 x i32> %z, i32 1
ret i32 %z1
}
```
Seems llc generates exactly same instructions for them at both pwr9 and pwr8. So don't understand why here we need extra cost for i1 types, the i1 type must have some kinds of users?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155876/new/
https://reviews.llvm.org/D155876
More information about the llvm-commits
mailing list