[LLVMbugs] [Bug 20917] New: Bug in lowering of llvm.ctlz with vector arguments

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 12 01:05:35 PDT 2014


            Bug ID: 20917
           Summary: Bug in lowering of llvm.ctlz with vector arguments
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: avolkov.intel at gmail.com
          Reporter: avolkov.intel at gmail.com
                CC: llvmbugs at cs.uiuc.edu, zinovy.nis at gmail.com
    Classification: Unclassified

Created attachment 13025
  --> http://llvm.org/bugs/attachment.cgi?id=13025&action=edit
Resulting assembler

For the following test case llc -mattr=+sse2 produces wrong code.

define <2 x i32> @test(<2 x i32> %x) {
  %1 = call <2 x i32> @llvm.ctlz.v2i32(<2 x i32> %x, i1 false)
  ret <2 x i32> %1

declare <2 x i32> @llvm.ctlz.v2i32(<2 x i32>, i1)

I attached resulting assembler.

The problem is in psubq instruction:
        .long   64                      # 0x40 <-- expected 32
        .long   0                       # 0x0
        .long   64                      # 0x40
        .long   0                       # 0x0
        psubq   .LCPI0_1, %xmm1

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/20140912/d7821afa/attachment.html>

More information about the llvm-bugs mailing list