================
@@ -71,6 +71,14 @@ def int_minmax_to_med3 : GICombineRule<
[{ return matchIntMinMaxToMed3(*${min_or_max}, ${matchinfo}); }]),
(apply [{ applyMed3(*${min_or_max}, ${matchinfo}); }])>;
+def d16_matchdata : GIDefMatchData<"D16MatchInfo">;
+
+def d16_load : GICombineRule<
+ (defs root:$bitcast, d16_matchdata:$matchinfo),
+ (match (wip_match_opcode G_BITCAST):$bitcast,
+ [{ return matchD16Load(*${bitcast}, ${matchinfo}); }]),
+ (apply [{ applyD16Load(*${bitcast}, ${matchinfo}); }])>;
----------------
Pierre-vh wrote:
You could use the `(combine ...` rule to do match + apply in one go, that
avoids passing the complex MatchInfo object around
https://github.com/llvm/llvm-project/pull/153178
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits