From: Craig Topper Date: Fri, 5 Jul 2019 17:31:29 +0000 (+0000) Subject: [X86] Update SSE1 MOVLPSrm and MOVHPSrm isel patterns to ensure loads are non-volatil... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e409e62fcecc9876df5f4d693fd49331fc3a2441;p=llvm [X86] Update SSE1 MOVLPSrm and MOVHPSrm isel patterns to ensure loads are non-volatile before folding. These patterns use 128-bit loads, but the instructions only load 64-bits. We shouldn't narrow the load if its volatile. Fixes another variant of PR42079 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365225 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index e4791eb3c32..dc2db1e8e61 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -660,7 +660,8 @@ let Predicates = [UseSSE1] in { // This pattern helps select MOVLPS on SSE1 only targets. With SSE2 we'll // end up with a movsd or blend instead of shufp. // No need for aligned load, we're only loading 64-bits. - def : Pat<(X86Shufp (loadv4f32 addr:$src2), VR128:$src1, (i8 -28)), + def : Pat<(X86Shufp (v4f32 (nonvolatile_load addr:$src2)), VR128:$src1, + (i8 -28)), (MOVLPSrm VR128:$src1, addr:$src2)>; } @@ -722,7 +723,7 @@ let Predicates = [UseSSE1] in { // This pattern helps select MOVHPS on SSE1 only targets. With SSE2 we'll // end up with a movsd or blend instead of shufp. // No need for aligned load, we're only loading 64-bits. - def : Pat<(X86Movlhps VR128:$src1, (loadv4f32 addr:$src2)), + def : Pat<(X86Movlhps VR128:$src1, (v4f32 (nonvolatile_load addr:$src2))), (MOVHPSrm VR128:$src1, addr:$src2)>; }