[PATCH] D140347: TargetLowering: Teach DemandedBits about VSCALE

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 20 08:57:58 PST 2022


compnerd marked 3 inline comments as done.
compnerd added a comment.

In D140347#4006583 <https://reviews.llvm.org/D140347#4006583>, @craig.topper wrote:

> BTW, why is this in SimplifyDemandedBits instead of computeKnownBits? It doesn't use the DemandedBits.

I couldn't answer that tbh, perhaps @benmxwl-arm can answer that.  I am only trying to help restore the patch that I reverted due to it regressing RVV.



================
Comment at: llvm/test/CodeGen/RISCV/vscale-demanded-bits.ll:47
+
+declare void @llvm.masked.store.nxv8i8.p0(<vscale x 8 x i8>, ptr nocapture, i32 immarg, <vscale x 8 x i1>)
----------------
craig.topper wrote:
> compnerd wrote:
> > craig.topper wrote:
> > > Don't you need a vscale_range attribute to hit the bug?
> > I thought so, except, removing the attributes somehow still reproduces the difference?  I don't think that the reduction is the best, and I'm happy to restore the attribute if you like.
> I thought in my testing that it won't make it to the APInt multiply without the attribute?
Ugh, I think I mixed up the command line outputs and thought it wasn't needed.  It is definitely needed on the test function.  Thanks for flagging that!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140347/new/

https://reviews.llvm.org/D140347



More information about the llvm-commits mailing list