|
17 | 17 | // Operand and SDNode transformation definitions.
|
18 | 18 | //===----------------------------------------------------------------------===//
|
19 | 19 |
|
20 |
| -def riscv_clzw : SDNode<"RISCVISD::CLZW", SDTIntUnaryOp>; |
21 |
| -def riscv_ctzw : SDNode<"RISCVISD::CTZW", SDTIntUnaryOp>; |
22 |
| -def riscv_rolw : SDNode<"RISCVISD::ROLW", SDTIntShiftOp>; |
23 |
| -def riscv_rorw : SDNode<"RISCVISD::RORW", SDTIntShiftOp>; |
24 |
| -def riscv_fslw : SDNode<"RISCVISD::FSLW", SDTIntShiftDOp>; |
25 |
| -def riscv_fsrw : SDNode<"RISCVISD::FSRW", SDTIntShiftDOp>; |
26 |
| -def riscv_fsl : SDNode<"RISCVISD::FSL", SDTIntShiftDOp>; |
27 |
| -def riscv_fsr : SDNode<"RISCVISD::FSR", SDTIntShiftDOp>; |
| 20 | +def riscv_clzw : SDNode<"RISCVISD::CLZW", SDTIntUnaryOp>; |
| 21 | +def riscv_ctzw : SDNode<"RISCVISD::CTZW", SDTIntUnaryOp>; |
| 22 | +def riscv_rolw : SDNode<"RISCVISD::ROLW", SDTIntShiftOp>; |
| 23 | +def riscv_rorw : SDNode<"RISCVISD::RORW", SDTIntShiftOp>; |
| 24 | +def riscv_fslw : SDNode<"RISCVISD::FSLW", SDTIntShiftDOp>; |
| 25 | +def riscv_fsrw : SDNode<"RISCVISD::FSRW", SDTIntShiftDOp>; |
| 26 | +def riscv_fsl : SDNode<"RISCVISD::FSL", SDTIntShiftDOp>; |
| 27 | +def riscv_fsr : SDNode<"RISCVISD::FSR", SDTIntShiftDOp>; |
| 28 | +def riscv_grevi : SDNode<"RISCVISD::GREVI", SDTIntBinOp>; |
| 29 | +def riscv_greviw : SDNode<"RISCVISD::GREVIW", SDTIntBinOp>; |
| 30 | +def riscv_gorci : SDNode<"RISCVISD::GORCI", SDTIntBinOp>; |
| 31 | +def riscv_gorciw : SDNode<"RISCVISD::GORCIW", SDTIntBinOp>; |
| 32 | +def riscv_shfli : SDNode<"RISCVISD::SHFLI", SDTIntBinOp>; |
28 | 33 |
|
29 | 34 | def UImmLog2XLenHalfAsmOperand : AsmOperandClass {
|
30 | 35 | let Name = "UImmLog2XLenHalf";
|
@@ -690,21 +695,16 @@ def : Pat<(rotr GPR:$rs1, uimmlog2xlen:$shamt),
|
690 | 695 | (RORI GPR:$rs1, uimmlog2xlen:$shamt)>;
|
691 | 696 | def : Pat<(rotl GPR:$rs1, uimmlog2xlen:$shamt),
|
692 | 697 | (RORI GPR:$rs1, (ImmSubFromXLen uimmlog2xlen:$shamt))>;
|
693 |
| -} |
694 | 698 |
|
695 |
| -def riscv_grevi : SDNode<"RISCVISD::GREVI", SDTIntBinOp, []>; |
696 |
| -def riscv_greviw : SDNode<"RISCVISD::GREVIW", SDTIntBinOp, []>; |
697 |
| -def riscv_gorci : SDNode<"RISCVISD::GORCI", SDTIntBinOp, []>; |
698 |
| -def riscv_gorciw : SDNode<"RISCVISD::GORCIW", SDTIntBinOp, []>; |
699 |
| -def riscv_shfli : SDNode<"RISCVISD::SHFLI", SDTIntBinOp, []>; |
| 699 | +// We treat orc.b as a separate instruction, so match it directly. We also |
| 700 | +// lower the Zbb orc.b intrinsic to this. |
| 701 | +def : Pat<(riscv_gorci GPR:$rs1, 7), (ORCB GPR:$rs1)>; |
| 702 | +} |
700 | 703 |
|
701 | 704 | let Predicates = [HasStdExtZbp] in {
|
702 | 705 | def : Pat<(riscv_shfli GPR:$rs1, timm:$shamt), (SHFLI GPR:$rs1, timm:$shamt)>;
|
703 | 706 | def : Pat<(riscv_grevi GPR:$rs1, timm:$shamt), (GREVI GPR:$rs1, timm:$shamt)>;
|
704 | 707 | def : Pat<(riscv_gorci GPR:$rs1, timm:$shamt), (GORCI GPR:$rs1, timm:$shamt)>;
|
705 |
| - |
706 |
| -// We treat orc.b as a separate instruction, so match it directly. |
707 |
| -def : Pat<(riscv_gorci GPR:$rs1, 7), (ORCB GPR:$rs1)>; |
708 | 708 | } // Predicates = [HasStdExtZbp]
|
709 | 709 |
|
710 | 710 | let Predicates = [HasStdExtZbp, IsRV32] in {
|
@@ -894,10 +894,6 @@ def : Pat<(i64 (or (and (assertsexti32 GPR:$rs2), 0xFFFFFFFFFFFF0000),
|
894 | 894 | (PACKUW GPR:$rs1, GPR:$rs2)>;
|
895 | 895 | } // Predicates = [HasStdExtZbp, IsRV64]
|
896 | 896 |
|
897 |
| -let Predicates = [HasStdExtZbb] in { |
898 |
| -def : PatGpr<int_riscv_orc_b, ORCB>; |
899 |
| -} // Predicates = [HasStdExtZbb] |
900 |
| - |
901 | 897 | let Predicates = [HasStdExtZbc] in {
|
902 | 898 | def : PatGprGpr<int_riscv_clmul, CLMUL>;
|
903 | 899 | def : PatGprGpr<int_riscv_clmulh, CLMULH>;
|
|
0 commit comments