[llvm] r372457 - [X86] Add test case to show failure to fold load with getmantss due to isel pattern looking for Constant instead of TargetConstant
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 20 23:44:24 PDT 2019
Author: ctopper
Date: Fri Sep 20 23:44:24 2019
New Revision: 372457
URL: http://llvm.org/viewvc/llvm-project?rev=372457&view=rev
Log:
[X86] Add test case to show failure to fold load with getmantss due to isel pattern looking for Constant instead of TargetConstant
The intrinsic has an immarg so its gets created with a TargetConstant
instead of a Constant after r372338. The isel pattern was only
updated for the register form, but not the memory form.
Modified:
llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll
Modified: llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll?rev=372457&r1=372456&r2=372457&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll Fri Sep 20 23:44:24 2019
@@ -4798,6 +4798,24 @@ define <4 x float>@test_int_x86_avx512_m
ret <4 x float> %res13
}
+define <4 x float> @test_int_x86_avx512_mask_getmant_ss_load(<4 x float> %x0, <4 x float>* %x1p) {
+; X64-LABEL: test_int_x86_avx512_mask_getmant_ss_load:
+; X64: # %bb.0:
+; X64-NEXT: vmovaps (%rdi), %xmm1
+; X64-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm0
+; X64-NEXT: retq
+;
+; X86-LABEL: test_int_x86_avx512_mask_getmant_ss_load:
+; X86: # %bb.0:
+; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
+; X86-NEXT: vmovaps (%eax), %xmm1
+; X86-NEXT: vgetmantss $11, %xmm1, %xmm0, %xmm0
+; X86-NEXT: retl
+ %x1 = load <4 x float>, <4 x float>* %x1p
+ %res = call <4 x float> @llvm.x86.avx512.mask.getmant.ss(<4 x float> %x0, <4 x float> %x1, i32 11, <4 x float> undef, i8 -1, i32 4)
+ ret <4 x float> %res
+}
+
declare <8 x double> @llvm.x86.avx512.vpermilvar.pd.512(<8 x double>, <8 x i64>)
define <8 x double>@test_int_x86_avx512_vpermilvar_pd_512(<8 x double> %x0, <8 x i64> %x1) {
More information about the llvm-commits
mailing list