mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
[X86] Require HasBMI2 for the new BZHI tablegen patterns.
Evidently tablegen doesn't infer this from the HasBMI2 predicate on the BZHI instructions. This should fix the recent bot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206885 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2113,6 +2113,7 @@ def BZHIMask : ImmLeaf<i64, [{
|
|||||||
return isMask_64(Imm) && (CountTrailingOnes_64(Imm) > 32);
|
return isMask_64(Imm) && (CountTrailingOnes_64(Imm) > 32);
|
||||||
}]>;
|
}]>;
|
||||||
|
|
||||||
|
let Predicates = [HasBMI2] in {
|
||||||
def : Pat<(and GR64:$src, BZHIMask:$mask),
|
def : Pat<(and GR64:$src, BZHIMask:$mask),
|
||||||
(BZHI64rr GR64:$src,
|
(BZHI64rr GR64:$src,
|
||||||
(INSERT_SUBREG (i64 (IMPLICIT_DEF)),
|
(INSERT_SUBREG (i64 (IMPLICIT_DEF)),
|
||||||
@@ -2133,6 +2134,7 @@ def : Pat<(and GR64:$src, (add (shl 1, GR8:$lz), -1)),
|
|||||||
def : Pat<(and (loadi64 addr:$src), (add (shl 1, GR8:$lz), -1)),
|
def : Pat<(and (loadi64 addr:$src), (add (shl 1, GR8:$lz), -1)),
|
||||||
(BZHI64rm addr:$src,
|
(BZHI64rm addr:$src,
|
||||||
(INSERT_SUBREG (i64 (IMPLICIT_DEF)), GR8:$lz, sub_8bit))>;
|
(INSERT_SUBREG (i64 (IMPLICIT_DEF)), GR8:$lz, sub_8bit))>;
|
||||||
|
} // HasBMI2
|
||||||
|
|
||||||
let Predicates = [HasBMI] in {
|
let Predicates = [HasBMI] in {
|
||||||
def : Pat<(X86bextr GR32:$src1, GR32:$src2),
|
def : Pat<(X86bextr GR32:$src1, GR32:$src2),
|
||||||
|
Reference in New Issue
Block a user