mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[X86] Remove and autoupgrade the avx512.mask.store.ss intrinsic.
llvm-svn: 332079
This commit is contained in:
parent
22e394ed73
commit
27b8020b8e
@ -1596,11 +1596,6 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
||||
GCCBuiltin<"__builtin_ia32_maskstoreps256">,
|
||||
Intrinsic<[], [llvm_ptr_ty,
|
||||
llvm_v8i32_ty, llvm_v8f32_ty], [IntrArgMemOnly]>;
|
||||
|
||||
def int_x86_avx512_mask_store_ss :
|
||||
GCCBuiltin<"__builtin_ia32_storess_mask">,
|
||||
Intrinsic<[], [llvm_ptr_ty, llvm_v4f32_ty, llvm_i8_ty],
|
||||
[IntrArgMemOnly]>;
|
||||
}
|
||||
|
||||
// BITALG bits shuffle
|
||||
|
@ -267,6 +267,7 @@ static bool ShouldUpgradeX86Intrinsic(Function *F, StringRef Name) {
|
||||
Name.startswith("avx512.mask.store.w.") || // Added in 3.9
|
||||
Name.startswith("avx512.mask.store.d.") || // Added in 3.9
|
||||
Name.startswith("avx512.mask.store.q.") || // Added in 3.9
|
||||
Name == "avx512.mask.store.ss" || // Added in 7.0
|
||||
Name.startswith("avx512.mask.loadu.") || // Added in 3.9
|
||||
Name.startswith("avx512.mask.load.") || // Added in 3.9
|
||||
Name == "sse42.crc32.64.8" || // Added in 3.4
|
||||
@ -1300,6 +1301,16 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsX86 && Name == "avx512.mask.store.ss") {
|
||||
Value *Mask = Builder.CreateAnd(CI->getArgOperand(2), Builder.getInt8(1));
|
||||
UpgradeMaskedStore(Builder, CI->getArgOperand(0), CI->getArgOperand(1),
|
||||
Mask, false);
|
||||
|
||||
// Remove intrinsic.
|
||||
CI->eraseFromParent();
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsX86 && (Name.startswith("avx512.mask.store"))) {
|
||||
// "avx512.mask.storeu." or "avx512.mask.store."
|
||||
bool Aligned = Name[17] != 'u'; // "avx512.mask.storeu".
|
||||
|
@ -4088,10 +4088,6 @@ def : Pat<(f64 (X86selects VK1WM:$mask, (f64 FR64X:$src1), (f64 FR64X:$src2))),
|
||||
VK1WM:$mask, (v2f64 (IMPLICIT_DEF)),
|
||||
(COPY_TO_REGCLASS FR64X:$src1, VR128X)), FR64X)>;
|
||||
|
||||
def : Pat<(int_x86_avx512_mask_store_ss addr:$dst, VR128X:$src, GR8:$mask),
|
||||
(VMOVSSZmrk addr:$dst, (COPY_TO_REGCLASS (i32 (INSERT_SUBREG (IMPLICIT_DEF), GR8:$mask, sub_8bit)), VK1WM),
|
||||
(COPY_TO_REGCLASS VR128X:$src, FR32X))>;
|
||||
|
||||
let hasSideEffects = 0 in {
|
||||
def VMOVSSZrr_REV: AVX512<0x11, MRMDestReg, (outs VR128X:$dst),
|
||||
(ins VR128X:$src1, VR128X:$src2),
|
||||
|
Loading…
Reference in New Issue
Block a user