[PATCH] D101472: [RISCV] Teach computeKnownBits that vsetvli returns number less than 2^31.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 10:16:53 PDT 2021
craig.topper created this revision.
craig.topper added reviewers: frasercrmck, evandro, HsiangKai, rogfer01, arcbbb, khchen, spatel.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.
This seems like a reasonable upper bound on VL. WG discussions for
the V spec would probably allow us to use 2^16 as an upper bound
on VLEN, but this is good enough for now.
This allows us to remove sext and zext if user happens to assign
the size_t result into an int and then uses it as a VL intrinsic
argument which is size_t.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D101472
Files:
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/test/CodeGen/RISCV/rvv/vsetvl-ext.ll
llvm/test/Transforms/InstCombine/RISCV/lit.local.cfg
llvm/test/Transforms/InstCombine/RISCV/riscv-vsetvli-knownbits.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101472.341255.patch
Type: text/x-patch
Size: 4454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210428/98a3300e/attachment.bin>
More information about the llvm-commits
mailing list