[llvm] [X86] Support lowering for APX promoted BMI instructions. (PR #77433)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 04:49:59 PST 2024
================
@@ -1307,6 +1307,17 @@ let Predicates = [HasBMI], AddedComplexity = -6 in {
(ANDN64rm GR64:$src1, addr:$src2)>;
}
+let Predicates = [HasBMI, HasEGPR], AddedComplexity = -6 in {
+ def : Pat<(and (not GR32:$src1), GR32:$src2),
+ (ANDN32rr_EVEX GR32:$src1, GR32:$src2)>;
+ def : Pat<(and (not GR64:$src1), GR64:$src2),
+ (ANDN64rr_EVEX GR64:$src1, GR64:$src2)>;
+ def : Pat<(and (not GR32:$src1), (loadi32 addr:$src2)),
+ (ANDN32rm_EVEX GR32:$src1, addr:$src2)>;
+ def : Pat<(and (not GR64:$src1), (loadi64 addr:$src2)),
+ (ANDN64rm_EVEX GR64:$src1, addr:$src2)>;
+}
----------------
RKSimon wrote:
We're collecting a lot of duplication here - how messy would it be to create defm macros that takes an optional "_EVEX" suffix?
https://github.com/llvm/llvm-project/pull/77433
More information about the llvm-commits
mailing list