[PATCH] D96661: [RISCV] Move SHFLI matching to DAG combine. Add 32-bit support for RV64
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 6 12:29:17 PDT 2021
RKSimon added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2721
+ unsigned Width = Op.getValueType() == MVT::i64 ? 64 : 32;
+ if (ShAmt >= Width && !isPowerOf2_64(ShAmt))
return None;
----------------
craig.topper wrote:
> RKSimon wrote:
> > @craig.topper Shouldn't this always early-out if ShAmt >= Width? Reported by coverity.
> You mean should that be an || instead of &&?
Yes - it might be a false positive but coverity is warning that *Mask can be shifted by 64 at line 2751.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96661/new/
https://reviews.llvm.org/D96661
More information about the llvm-commits
mailing list