[RISCV] Add Predicates to the XVentanaCondOps isel patterns.
authorCraig Topper <craig.topper@sifive.com>
Tue, 20 Dec 2022 03:28:56 +0000 (19:28 -0800)
committerCraig Topper <craig.topper@sifive.com>
Tue, 20 Dec 2022 03:29:00 +0000 (19:29 -0800)
Missed this in the review of D139394. Not a functional issue because
select only makes it to isel with XVentanaCondOps.

llvm/lib/Target/RISCV/RISCVInstrInfoXVentana.td

index b698413..262df67 100644 (file)
@@ -35,6 +35,7 @@ multiclass XVentanaCondops_pats<SDPatternOperator Op, RVInst MI> {
            (MI $rs1, (VT_MASKCN $rs2, $rc))>;
 }
 
+let Predicates = [IsRV64, HasVendorXVentanaCondOps] in {
 // Directly use MASKC/MASKCN in case of any of the operands being 0.
 def: Pat<(select i64:$rc, i64:$rs1, (i64 0)),
          (VT_MASKC $rs1, $rc)>;
@@ -56,3 +57,4 @@ def: Pat<(select i64:$rc, i64:$rs1, (and i64:$rs1, i64:$rs2)),
 // Basic select pattern that selects between 2 registers.
 def: Pat<(select i64:$rc, i64:$rs1, i64:$rs2),
          (OR (VT_MASKC $rs1, $rc), (VT_MASKCN $rs2, $rc))>;
+} // Predicates = [IsRV64, HasVendorXVentanaCondOps]