Skip to content

Commit cbc1df5

Browse files
author
Brendan Sweeney
committed
Making Zalasr lowering match the psABI (aka lb.aqrl and sb.aqrl are no longer used in the lowering)
1 parent 5cd0279 commit cbc1df5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoZalasr.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,28 +71,28 @@ class PatSRL<SDPatternOperator OpNode, RVInst Inst, ValueType vt = XLenVT>
7171

7272
let Predicates = [HasStdExtZalasr] in {
7373
def : PatLAQ<acquiring_load<atomic_load_8>, LB_AQ_AQ>;
74-
def : PatLAQ<seq_cst_load<atomic_load_8>, LB_AQ_AQ_RL>;
74+
def : PatLAQ<seq_cst_load<atomic_load_8>, LB_AQ_AQ>; // these use lb.aq instead of lb.aqrl to match the psABI
7575

7676
def : PatLAQ<acquiring_load<atomic_load_16>, LH_AQ_AQ>;
77-
def : PatLAQ<seq_cst_load<atomic_load_16>, LH_AQ_AQ_RL>;
77+
def : PatLAQ<seq_cst_load<atomic_load_16>, LH_AQ_AQ>;
7878

7979
def : PatLAQ<acquiring_load<atomic_load_32>, LW_AQ_AQ>;
80-
def : PatLAQ<seq_cst_load<atomic_load_32>, LW_AQ_AQ_RL>;
80+
def : PatLAQ<seq_cst_load<atomic_load_32>, LW_AQ_AQ>;
8181

8282
def : PatSRL<releasing_store<atomic_store_8>, SB_RL_RL>;
83-
def : PatSRL<seq_cst_store<atomic_store_8>, SB_RL_AQ_RL>;
83+
def : PatSRL<seq_cst_store<atomic_store_8>, SB_RL_RL>; // these use sb.rl instead of sb.aqrl to match the psABI
8484

8585
def : PatSRL<releasing_store<atomic_store_16>, SH_RL_RL>;
86-
def : PatSRL<seq_cst_store<atomic_store_16>, SH_RL_AQ_RL>;
86+
def : PatSRL<seq_cst_store<atomic_store_16>, SH_RL_RL>;
8787

8888
def : PatSRL<releasing_store<atomic_store_32>, SW_RL_RL>;
89-
def : PatSRL<seq_cst_store<atomic_store_32>, SW_RL_AQ_RL>;
89+
def : PatSRL<seq_cst_store<atomic_store_32>, SW_RL_RL>;
9090
} // Predicates HasStdExtZalasr
9191

9292
let Predicates = [HasStdExtZalasr, IsRV64] in {
9393
def : PatLAQ<acquiring_load<atomic_load_64>, LD_AQ_AQ>;
94-
def : PatLAQ<seq_cst_load<atomic_load_64>, LD_AQ_AQ_RL>;
94+
def : PatLAQ<seq_cst_load<atomic_load_64>, LD_AQ_AQ>;
9595

9696
def : PatSRL<releasing_store<atomic_store_64>, SD_RL_RL>;
97-
def : PatSRL<seq_cst_store<atomic_store_64>, SD_RL_AQ_RL>;
97+
def : PatSRL<seq_cst_store<atomic_store_64>, SD_RL_RL>;
9898
} // Predicates HasStdExtZalasr, IsRV64

0 commit comments

Comments
 (0)