Skip to content

Commit 47826b3

Browse files
committed
[LoongArch] Fix td pattern for CACOP LDPTE and LDDIR
The immediate argument should be a target constant (`timm`).
1 parent d1985e3 commit 47826b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/LoongArch/LoongArchInstrInfo.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,9 +1992,9 @@ defm : PseudoBinPat<"atomic_load_xor_32", PseudoAtomicLoadXor32>;
19921992
/// Intrinsics
19931993

19941994
def : Pat<(int_loongarch_cacop_d timm:$op, i64:$rj, timm:$imm12),
1995-
(CACOP uimm5:$op, GPR:$rj, simm12:$imm12)>;
1995+
(CACOP timm:$op, GPR:$rj, timm:$imm12)>;
19961996
def : Pat<(int_loongarch_cacop_w i32:$op, i32:$rj, i32:$imm12),
1997-
(CACOP uimm5:$op, GPR:$rj, simm12:$imm12)>;
1997+
(CACOP timm:$op, GPR:$rj, timm:$imm12)>;
19981998
def : Pat<(loongarch_dbar uimm15:$imm15), (DBAR uimm15:$imm15)>;
19991999
def : Pat<(loongarch_ibar uimm15:$imm15), (IBAR uimm15:$imm15)>;
20002000
def : Pat<(loongarch_break uimm15:$imm15), (BREAK uimm15:$imm15)>;
@@ -2158,9 +2158,9 @@ def : Pat<(int_loongarch_asrtle_d GPR:$rj, GPR:$rk),
21582158
def : Pat<(int_loongarch_asrtgt_d GPR:$rj, GPR:$rk),
21592159
(ASRTGT_D GPR:$rj, GPR:$rk)>;
21602160
def : Pat<(int_loongarch_lddir_d GPR:$rj, timm:$imm8),
2161-
(LDDIR GPR:$rj, uimm8:$imm8)>;
2161+
(LDDIR GPR:$rj, timm:$imm8)>;
21622162
def : Pat<(int_loongarch_ldpte_d GPR:$rj, timm:$imm8),
2163-
(LDPTE GPR:$rj, uimm8:$imm8)>;
2163+
(LDPTE GPR:$rj, timm:$imm8)>;
21642164
} // Predicates = [IsLA64]
21652165

21662166
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)