Skip to content

Commit 613e3bd

Browse files
committed
Strengthen check in vsplatf32_fpimm_eq_1
Otherwise, many tests will failed in LA32. For example: CodeGen/LoongArch/lasx/fsqrt.ll
1 parent e1a23dd commit 613e3bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ def vsplatf32_fpimm_eq_1
158158
N = N->getOperand(0).getNode();
159159

160160
return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
161+
Imm.getBitWidth() == 32 &&
161162
Imm.getBitWidth() == EltTy.getSizeInBits() &&
162163
Imm == APFloat(+1.0f).bitcastToAPInt();
163164
}]>;

0 commit comments

Comments
 (0)