[llvm-bugs] [Bug 30981] New: AVX512: FastISel generates invalid seto

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 10 14:09:35 PST 2016


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

            Bug ID: 30981
           Summary: AVX512: FastISel generates invalid seto
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: mkuper at google.com
                CC: craig.topper at gmail.com, igor.breger at intel.com,
                    llvm-bugs at lists.llvm.org, zvi.rackover at intel.com
    Classification: Unclassified

For this IR:

define i64 @foo(i64 %arg) {
bb:
  %tmp1 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %arg, i64 4)
  %tmp2 = extractvalue { i64, i1 } %tmp1, 1
  %tmp3 = select i1 %tmp2, i64 -1, i64 %arg
  ret i64 %tmp3
}

; Function Attrs: nounwind readnone
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64)

Compiling for AVX512 with -O0 we get:

$ bin/llc ~/llvm/temp/badnew.ll -O0 -o - -mattr=+avx512f
[...]
    movq    %rdi, %rax
    mulq    %rdx
    seto    %k0
[...]

seto %k0 looks like a nonsense instruction, and ends up getting encoded as seto
%al.

-- 
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/20161110/606ace0f/attachment.html>


More information about the llvm-bugs mailing list