[llvm] r318009 - [X86] Use sse_load_f32/f64 in patterns for the memory forms of VRNDSCALESS/SD.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 12 18:03:01 PST 2017
Author: ctopper
Date: Sun Nov 12 18:03:01 2017
New Revision: 318009
URL: http://llvm.org/viewvc/llvm-project?rev=318009&view=rev
Log:
[X86] Use sse_load_f32/f64 in patterns for the memory forms of VRNDSCALESS/SD.
Modified:
llvm/trunk/lib/Target/X86/X86InstrAVX512.td
llvm/trunk/test/CodeGen/X86/sse41-intrinsics-x86.ll
llvm/trunk/test/CodeGen/X86/sse41-schedule.ll
Modified: llvm/trunk/lib/Target/X86/X86InstrAVX512.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrAVX512.td?rev=318009&r1=318008&r2=318009&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrAVX512.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrAVX512.td Sun Nov 12 18:03:01 2017
@@ -7672,9 +7672,8 @@ avx512_rndscale_scalar<bits<8> opc, stri
(ins _.RC:$src1, _.ScalarMemOp:$src2, i32u8imm:$src3),
OpcodeStr,
"$src3, $src2, $src1", "$src1, $src2, $src3",
- (_.VT (X86RndScales (_.VT _.RC:$src1),
- (_.VT (scalar_to_vector (_.ScalarLdFrag addr:$src2))),
- (i32 imm:$src3)))>;
+ (_.VT (X86RndScales _.RC:$src1,
+ _.ScalarIntMemCPat:$src2, (i32 imm:$src3)))>;
let isCodeGenOnly = 1, hasSideEffects = 0 in {
def r : I<opc, MRMSrcReg, (outs _.FRC:$dst),
Modified: llvm/trunk/test/CodeGen/X86/sse41-intrinsics-x86.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse41-intrinsics-x86.ll?rev=318009&r1=318008&r2=318009&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse41-intrinsics-x86.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse41-intrinsics-x86.ll Sun Nov 12 18:03:01 2017
@@ -524,8 +524,7 @@ define <2 x double> @test_x86_sse41_roun
; SKX-LABEL: test_x86_sse41_round_sd_load:
; SKX: ## BB#0:
; SKX-NEXT: movl {{[0-9]+}}(%esp), %eax ## encoding: [0x8b,0x44,0x24,0x04]
-; SKX-NEXT: vmovapd (%eax), %xmm1 ## EVEX TO VEX Compression encoding: [0xc5,0xf9,0x28,0x08]
-; SKX-NEXT: vrndscalesd $7, %xmm1, %xmm0, %xmm0 ## encoding: [0x62,0xf3,0xfd,0x08,0x0b,0xc1,0x07]
+; SKX-NEXT: vrndscalesd $7, (%eax), %xmm0, %xmm0 ## encoding: [0x62,0xf3,0xfd,0x08,0x0b,0x00,0x07]
; SKX-NEXT: retl ## encoding: [0xc3]
%a1b = load <2 x double>, <2 x double>* %a1
%res = call <2 x double> @llvm.x86.sse41.round.sd(<2 x double> %a0, <2 x double> %a1b, i32 7) ; <<2 x double>> [#uses=1]
Modified: llvm/trunk/test/CodeGen/X86/sse41-schedule.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse41-schedule.ll?rev=318009&r1=318008&r2=318009&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse41-schedule.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse41-schedule.ll Sun Nov 12 18:03:01 2017
@@ -3152,8 +3152,7 @@ define <2 x double> @test_roundsd(<2 x d
; SKX-LABEL: test_roundsd:
; SKX: # BB#0:
; SKX-NEXT: vrndscalesd $7, %xmm1, %xmm0, %xmm1 # sched: [8:0.67]
-; SKX-NEXT: vmovapd (%rdi), %xmm2 # sched: [6:0.50]
-; SKX-NEXT: vrndscalesd $7, %xmm2, %xmm0, %xmm0 # sched: [8:0.67]
+; SKX-NEXT: vrndscalesd $7, (%rdi), %xmm0, %xmm0 # sched: [14:0.67]
; SKX-NEXT: vaddpd %xmm0, %xmm1, %xmm0 # sched: [4:0.33]
; SKX-NEXT: retq # sched: [7:1.00]
;
@@ -3226,8 +3225,7 @@ define <4 x float> @test_roundss(<4 x fl
; SKX-LABEL: test_roundss:
; SKX: # BB#0:
; SKX-NEXT: vrndscaless $7, %xmm1, %xmm0, %xmm1 # sched: [8:0.67]
-; SKX-NEXT: vmovaps (%rdi), %xmm2 # sched: [6:0.50]
-; SKX-NEXT: vrndscaless $7, %xmm2, %xmm0, %xmm0 # sched: [8:0.67]
+; SKX-NEXT: vrndscaless $7, (%rdi), %xmm0, %xmm0 # sched: [14:0.67]
; SKX-NEXT: vaddps %xmm0, %xmm1, %xmm0 # sched: [4:0.33]
; SKX-NEXT: retq # sched: [7:1.00]
;
More information about the llvm-commits
mailing list