================
@@ -1735,8 +1735,10 @@ unsigned SILoadStoreOptimizer::getNewOpcode(const
CombineInfo &CI,
case UNKNOWN:
llvm_unreachable("Unknown instruction class");
case S_BUFFER_LOAD_IMM: {
+ // If XNACK is enabled, use the constrained opcodes when the first load is
+ // under-aligned.
const MachineMemOperand *MMO = *CI.I->memoperands_begin();
- bool NeedsConstrainedOpc = needsConstraintedOpcode(*STM, MMO, Width);
+ bool NeedsConstrainedOpc = MMO && needsConstrainedOpcode(*STM, MMO, Width);
----------------
arsenm wrote:
This is an invalid way of checking for no mmo. This is dereferencing the end
iterator.
https://github.com/llvm/llvm-project/pull/101619
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits