[PATCH] D139530: [WebAssembly] Add ComplexPattern for loads
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 7 10:46:42 PST 2022
tlively added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp:360-361
+
+ // Likewise, treat an 'or' node as an 'add' if the or'ed bits are
+ // known to be zero and fold them into the offset too.
+ if (N.getOpcode() == ISD::OR) {
----------------
Do we have tests covering these cases?
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp:79
+ auto &OffsetOp = MI.getOperand(OffsetOperandNum);
+ // Don't fold offset in if offset is a global address to be resolved later
+ if (OffsetOp.isImm()) {
----------------
What's the benefit of this extra logic?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139530/new/
https://reviews.llvm.org/D139530
More information about the llvm-commits
mailing list