[llvm] r332079 - [X86] Remove and autoupgrade the avx512.mask.store.ss intrinsic.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 10 21:33:18 PDT 2018
Author: ctopper
Date: Thu May 10 21:33:18 2018
New Revision: 332079
URL: http://llvm.org/viewvc/llvm-project?rev=332079&view=rev
Log:
[X86] Remove and autoupgrade the avx512.mask.store.ss intrinsic.
Modified:
llvm/trunk/include/llvm/IR/IntrinsicsX86.td
llvm/trunk/lib/IR/AutoUpgrade.cpp
llvm/trunk/lib/Target/X86/X86InstrAVX512.td
Modified: llvm/trunk/include/llvm/IR/IntrinsicsX86.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IntrinsicsX86.td?rev=332079&r1=332078&r2=332079&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IntrinsicsX86.td (original)
+++ llvm/trunk/include/llvm/IR/IntrinsicsX86.td Thu May 10 21:33:18 2018
@@ -1596,11 +1596,6 @@ let TargetPrefix = "x86" in { // All in
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
Modified: llvm/trunk/lib/IR/AutoUpgrade.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AutoUpgrade.cpp?rev=332079&r1=332078&r2=332079&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AutoUpgrade.cpp (original)
+++ llvm/trunk/lib/IR/AutoUpgrade.cpp Thu May 10 21:33:18 2018
@@ -267,6 +267,7 @@ static bool ShouldUpgradeX86Intrinsic(Fu
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
@@ -1297,6 +1298,16 @@ void llvm::UpgradeIntrinsicCall(CallInst
// Remove intrinsic.
CI->eraseFromParent();
+ 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;
}
Modified: llvm/trunk/lib/Target/X86/X86InstrAVX512.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=332079&r1=332078&r2=332079&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrAVX512.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td Thu May 10 21:33:18 2018
@@ -4088,10 +4088,6 @@ def : Pat<(f64 (X86selects VK1WM:$mask,
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),
More information about the llvm-commits
mailing list