[llvm] [GlobalISel] Fix crash in isConstantOrConstantSplatVectorFP for non-r… (PR #208657)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 14 02:57:25 PDT 2026
================
@@ -1542,6 +1542,8 @@ llvm::isConstantOrConstantSplatVector(MachineInstr &MI,
std::optional<APFloat>
llvm::isConstantOrConstantSplatVectorFP(MachineInstr &MI,
const MachineRegisterInfo &MRI) {
+ if (!MI.getOperand(0).isReg())
+ return std::nullopt;
----------------
arsenm wrote:
> Wouldn't the semantics of this be slightly odd given that some indices are defs and some are uses?
The intent would only be to use it with defs
https://github.com/llvm/llvm-project/pull/208657
More information about the llvm-commits
mailing list