[llvm-bugs] [Bug 32743] New: [X86][SSE] Non-temporal loads shouldn't be folded if it can be avoided

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 22 08:23:57 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32743

            Bug ID: 32743
           Summary: [X86][SSE] Non-temporal loads shouldn't be folded if
                    it can be avoided
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: llvm-dev at redking.me.uk
                CC: llvm-bugs at lists.llvm.org, spatel+llvm at rotateright.com

>From SSE4.1 we have (V)MOVNTDQA non-temporal vector loads which allows us to
avoid cache pollution; unfortunately these loads currently can be folded which
results in a temporal vector load which will mean that these will then touch
the cache again.

On pre-SSE41 targets we can safely use regular loads and do the fold without
any regression.

This will probably require us to fix both the tablegen patterns and the
memory-folding tables.

llc < %s -mtriple=x86_64-unknown -mcpu=btver2

define <4 x float> @test_arg_v4f32(<4 x float> %arg, <4 x float>* %src) {
  %1 = load <4 x float>, <4 x float>* %src, align 16, !nontemporal !1
  %2 = fadd <4 x float> %arg, %1
  ret <4 x float> %2
}
!1 = !{i32 1}

vaddps (%rdi), %xmm0, %xmm0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170422/f81d1c58/attachment.html>


More information about the llvm-bugs mailing list