[LLVMbugs] [Bug 10496] [AVX] missing intrinsics for integer min/max instructions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 3 16:22:53 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=10496

Matt Pharr <matt at pharr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #5 from Matt Pharr <matt at pharr.org> 2011-08-03 18:22:52 CDT ---
I still seem to be confused (or something is missing).  I'd like to take two <8
x i32> vectors and compute the element-wise minimum of them.  My understanding
from your explanation below is that the following should work, but llc
-mattr=+avx gives me two errors of:

Intrinsic prototype has incorrect number of vector elements!
<8 x i32> (<8 x i32>, <8 x i32>)* @llvm.x86.sse41.pminsd

before crashing.  (Note the 'dword' / i32 variants of the integer min/max stuff
were introduced in sse4.1.)

Help?

declare <8 x i32> @llvm.x86.sse41.pminsd(<8 x i32>, <8 x i32>) nounwind
readnone

define <8 x i32> @m(<8 x i32> %a, <8 x i32> %b) nounwind readnone {
  %s = call <8 x i32> @llvm.x86.sse41.pminsd(<8 x i32> %a, <8 x i32> %b)
  ret <8 x i32> %s
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list