Skip to content

Commit f58d68a

Browse files
committed
[DAG] Always use stack to promote bitcast operand when the source is vector
1 parent f7291c2 commit f58d68a

File tree

11 files changed

+4608
-928
lines changed

11 files changed

+4608
-928
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,8 @@ SDValue DAGTypeLegalizer::PromoteIntOp_BITCAST(SDNode *N) {
22182218
switch (getTypeAction(InVT)) {
22192219
case TargetLowering::TypePromoteInteger: {
22202220
// TODO: Handle big endian
2221-
if (OutVT.isVector() && DAG.getDataLayout().isLittleEndian()) {
2221+
if (OutVT.isVector() && !InVT.isVector() &&
2222+
DAG.getDataLayout().isLittleEndian()) {
22222223
EVT EltVT = OutVT.getVectorElementType();
22232224
TypeSize EltSize = EltVT.getSizeInBits();
22242225
TypeSize NInSize = NInVT.getSizeInBits();

llvm/test/CodeGen/AMDGPU/ctpop16.ll

Lines changed: 275 additions & 55 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)