When matching store instruction for ldst opt, we should make sure store instr is in 'reg+imm' form as load instr,
otherwise, it will have assertion in isLdOffsetInRangeOfSt while it will use getImm() directly.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/AArch64/arm64-ldst-opt-match.ll | ||
---|---|---|
20 ↗ | (On Diff #292785) | This testcase seems extremely fragile; can we use an MIR testcase instead? (There are a bunch of in-tree examples of using -run-pass=aarch64-ldst-opt.) |
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp | ||
---|---|---|
1190 | Also, maybe fix this comment to clarify what the problem is. The store should be an opcode that can use an immediate operand. The problem is that the "immediate" might actually be the address of a global variable. |
Comment Actions
Update test case by using MIR
llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp | ||
---|---|---|
1190 | fixed. |
Also, maybe fix this comment to clarify what the problem is. The store should be an opcode that can use an immediate operand. The problem is that the "immediate" might actually be the address of a global variable.