[PATCH] D103758: [RISCV] Use ZeroOrNegativeOneBooleanContent for vectors.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 5 13:12:22 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, evandro, HsiangKai, khchen, arcbbb, rogfer01.
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.

We use i1 vectors for boolean results for V so the difference between
one and negative probably doesn't matter in most cases. Zero or negative
one is consistent with the P extension if we ever need V and P to co-exist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103758

Files:
  llvm/lib/Target/RISCV/RISCVISelLowering.cpp


Index: llvm/lib/Target/RISCV/RISCVISelLowering.cpp
===================================================================
--- llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -391,7 +391,7 @@
   setBooleanContents(ZeroOrOneBooleanContent);
 
   if (Subtarget.hasStdExtV()) {
-    setBooleanVectorContents(ZeroOrOneBooleanContent);
+    setBooleanVectorContents(ZeroOrNegativeOneBooleanContent);
 
     setOperationAction(ISD::VSCALE, XLenVT, Custom);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103758.350077.patch
Type: text/x-patch
Size: 496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210605/6efd3025/attachment.bin>


More information about the llvm-commits mailing list