[llvm-bugs] [Bug 33303] New: Cannot select llvm.canonicalize.f64

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jun 4 09:54:25 PDT 2017


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

            Bug ID: 33303
           Summary: Cannot select llvm.canonicalize.f64
           Product: libraries
           Version: 4.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: simonas+llvm.org at kazlauskas.me
                CC: llvm-bugs at lists.llvm.org

target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind readnone uwtable
define double @max(double, double) unnamed_addr #0 {
start:
  %2 = fcmp olt double %0, %1
  %3 = fcmp uno double %0, 0.000000e+00
  %or.cond.i.i = or i1 %3, %2
  %4 = select i1 %or.cond.i.i, double %1, double %0
  %5 = tail call double @llvm.canonicalize.f64(double %4) #2
  ret double %5
}

; Function Attrs: nounwind readnone
declare double @llvm.canonicalize.f64(double) #1

attributes #0 = { nounwind readnone uwtable }
attributes #1 = { nounwind readnone }
attributes #2 = { nounwind }

Will fail during instruction selection with (when compiled with `llc test.ll`)

LLVM ERROR: Cannot select: 0x2258ce8: f64 = fcanonicalize 0x2258c80
  0x2258c80: f64 = X86ISD::FOR 0x2258a10, 0x2258bb0
    0x2258a10: f64 = X86ISD::FANDN 0x2258ef0, 0x2258c18
      0x2258ef0: f64 = X86ISD::FSETCC 0x22588d8, 0x22588d8, Constant:i8<3>
        0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
          0x2258870: f64 = Register %vreg0
        0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
          0x2258870: f64 = Register %vreg0
        0x2258a78: i8 = Constant<3>
      0x2258c18: f64 = X86ISD::FMAX 0x22589a8, 0x22588d8
        0x22589a8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg1
          0x2258940: f64 = Register %vreg1
        0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
          0x2258870: f64 = Register %vreg0
    0x2258bb0: f64 = X86ISD::FAND 0x2258ef0, 0x22589a8
      0x2258ef0: f64 = X86ISD::FSETCC 0x22588d8, 0x22588d8, Constant:i8<3>
        0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
          0x2258870: f64 = Register %vreg0
        0x22588d8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg0
          0x2258870: f64 = Register %vreg0
        0x2258a78: i8 = Constant<3>
      0x22589a8: f64,ch = CopyFromReg 0x21eb3c0, Register:f64 %vreg1
        0x2258940: f64 = Register %vreg1
In function: max

Happens with x86, arm, powerpc, mips, etc backends.

-- 
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/20170604/47ef3565/attachment.html>


More information about the llvm-bugs mailing list