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: unassignedb...@nondot.org
          Reporter: mku...@google.com
                CC: craig.top...@gmail.com, igor.bre...@intel.com,
                    llvm-bugs@lists.llvm.org, zvi.racko...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to