[PATCH] D140530: [RISCV] Add integer scalar instructions to isAssociativeAndCommutative
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 28 11:45:01 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:1354
+ return RISCV::hasEqualFRM(Inst, Sibling) ||
+ (InstFrmOpIdx < 0 && SiblingFrmOpIdx < 0);
}
----------------
swap the order of these conditions. There's no reason to call hasEqualFRM if we already know both indices are negative.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140530/new/
https://reviews.llvm.org/D140530
More information about the llvm-commits
mailing list