================
@@ -2088,8 +2088,26 @@ multiclass binary_atomic_op_wd<string inst, string op,
string signed = ""> {
(!cast<Instruction>(inst#"__DB_D"#signed) GPR:$rk, GPR:$rj)>;
}
+// Atomic operation for byte and half word
+multiclass binary_atomic_op_bh<string inst, string op> {
+ def : Pat<(!cast<PatFrag>(op#"_i8_monotonic") GPR:$rj, GPR:$rk),
+ (!cast<Instruction>(inst#"_B") GPR:$rk, GPR:$rj)>;
+ def : Pat<(!cast<PatFrag>(op#"_i16_monotonic") GPR:$rj, GPR:$rk),
+ (!cast<Instruction>(inst#"_H") GPR:$rk, GPR:$rj)>;
+
+ def : Pat<(!cast<PatFrag>(op#"_i8") GPR:$rj, GPR:$rk),
+ (!cast<Instruction>(inst#"__DB_B") GPR:$rk, GPR:$rj)>;
+ def : Pat<(!cast<PatFrag>(op#"_i16") GPR:$rj, GPR:$rk),
+ (!cast<Instruction>(inst#"__DB_H") GPR:$rk, GPR:$rj)>;
+}
+
let Predicates = [IsLA64] in {
+let Predicates = [ HasLAM_BH ] in {
----------------
SixWeining wrote:
Does this predicate override the predicate in line 2104?
https://github.com/llvm/llvm-project/pull/113255
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits