From: Craig Topper Date: Mon, 13 Nov 2017 06:46:48 +0000 (+0000) Subject: [X86] Use sse_load_f32/f64 to improve load folding for scalar VFPCLASS intrinsics. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca8abedb2a9d4540e42582849a226542904bb946;p=platform%2Fupstream%2Fllvm.git [X86] Use sse_load_f32/f64 to improve load folding for scalar VFPCLASS intrinsics. llvm-svn: 318019 --- diff --git a/llvm/lib/Target/X86/X86InstrAVX512.td b/llvm/lib/Target/X86/X86InstrAVX512.td index 12b3787..5a59645 100644 --- a/llvm/lib/Target/X86/X86InstrAVX512.td +++ b/llvm/lib/Target/X86/X86InstrAVX512.td @@ -2365,18 +2365,18 @@ multiclass avx512_scalar_fpclass opc, string OpcodeStr, SDNode OpNode, (OpNode (_.VT _.RC:$src1), (i32 imm:$src2))))], NoItinerary>, EVEX_K; def rm : AVX512; def rmk : AVX512, EVEX_K; } } diff --git a/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll b/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll index 49f439f..529f58d 100644 --- a/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll +++ b/llvm/test/CodeGen/X86/avx512dq-intrinsics.ll @@ -399,8 +399,7 @@ define i8 @test_int_x86_avx512_mask_fpclass_sd(<2 x double> %x0, i8 %x1) { define i8 @test_int_x86_avx512_mask_fpclass_sd_load(<2 x double>* %x0ptr) { ; CHECK-LABEL: test_int_x86_avx512_mask_fpclass_sd_load: ; CHECK: ## BB#0: -; CHECK-NEXT: vmovapd (%rdi), %xmm0 -; CHECK-NEXT: vfpclasssd $4, %xmm0, %k0 +; CHECK-NEXT: vfpclasssd $4, (%rdi), %k0 ; CHECK-NEXT: kmovw %k0, %eax ; CHECK-NEXT: ## kill: %AL %AL %EAX ; CHECK-NEXT: retq @@ -431,8 +430,7 @@ define i8 @test_int_x86_avx512_mask_fpclass_ss(<4 x float> %x0, i8 %x1) { define i8 @test_int_x86_avx512_mask_fpclass_ss_load(<4 x float>* %x0ptr, i8 %x1) { ; CHECK-LABEL: test_int_x86_avx512_mask_fpclass_ss_load: ; CHECK: ## BB#0: -; CHECK-NEXT: vmovaps (%rdi), %xmm0 -; CHECK-NEXT: vfpclassss $4, %xmm0, %k0 +; CHECK-NEXT: vfpclassss $4, (%rdi), %k0 ; CHECK-NEXT: kmovw %k0, %eax ; CHECK-NEXT: ## kill: %AL %AL %EAX ; CHECK-NEXT: retq