[llvm] [RISCV][GISEL] Legalize, regbank select, and instruction select G_ZEXT, G_SEXT, G_ANYEXT, G_SPLAT_VECTOR, and G_ICMP (PR #85938)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 12:13:39 PDT 2024


================
@@ -229,6 +236,9 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
 
   getActionDefinitionsBuilder(G_ICMP)
       .legalFor({{sXLen, sXLen}, {sXLen, p0}})
+      .legalIf(all(typeIsLegalBoolVec(0, BoolVecTys, ST),
+                   typeIsLegalIntOrFPVec(1, IntOrFPVecTys, ST)))
+      .widenScalarOrEltToNextPow2OrMinSize(1, 8)
----------------
michaelmaitland wrote:

With `widenScalarToNextPow2` if the size was s1, then it would not be widened. There is nothing in the MachineVerifier that says it couldn't be an i1 scalar.

https://github.com/llvm/llvm-project/pull/85938


More information about the llvm-commits mailing list