[llvm-bugs] [Bug 52031] New: OrcJIT breaks call with <4 x i64> vector

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 1 10:01:36 PDT 2021


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

            Bug ID: 52031
           Summary: OrcJIT breaks call with <4 x i64> vector
           Product: libraries
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: OrcJIT
          Assignee: unassignedbugs at nondot.org
          Reporter: sean.m.bartell at gmail.com
                CC: 1101.debian at gmail.com, llvm-bugs at lists.llvm.org

On x86-64, lli -jit-kind=orc executes the following code incorrectly. The
return value from main should be 0. Instead, it returns 16. lli -jit-kind=mcjit
and llc produce the correct output.

define i32 @main() #0 {
  br label %1
1:                                                ; preds = %1, %0
  %2 = phi i64 [ 0, %0 ], [ %6, %1 ]
  %3 = phi <4 x i64> [ <i64 -16, i64 -16, i64 -16, i64 -16>, %0 ], [ %5, %1 ]
  %4 = trunc <4 x i64> %3 to <4 x i32>
  %5 = call <4 x i64> @new_function(<4 x i64> %3)
  %6 = add i64 %2, 1
  %7 = icmp eq i64 %6, 2
  br i1 %7, label %8, label %1
8:                                                ; preds = %1
  %9 = extractelement <4 x i32> %4, i32 3
  ret i32 %9
}
define <4 x i64> @new_function(<4 x i64> %0) unnamed_addr {
  %2 = add <4 x i64> %0, <i64 16, i64 16, i64 16, i64 16>
  ret <4 x i64> %2
}
attributes #0 = { "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" }

-- 
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/20211001/ca32d84b/attachment.html>


More information about the llvm-bugs mailing list