[llvm-bugs] [Bug 27421] New: Mips64: Missing sign extension when operand for truncate instruction is in another basic block.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 19 03:29:32 PDT 2016


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

            Bug ID: 27421
           Summary: Mips64: Missing sign extension when operand for
                    truncate instruction is in another basic block.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: MIPS
          Assignee: unassignedbugs at nondot.org
          Reporter: Vasileios.Kalintiris at imgtec.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Test case for this problem :

define i64 @foo1(i64 zeroext %var) {
entry:
  %shr = lshr i64 %var, 32
  %cmp = icmp eq i64 %shr, 0
  br i1 %cmp, label %if.end6, label %if.then

if.then:                                          ; preds = %entry
  %conv = trunc i64 %shr to i32
  %cmp2 = icmp slt i32 %conv, 0
  br i1 %cmp2, label %if.then4, label %if.else

if.then4:                                         ; preds = %if.then
  %add = add i64 %var, 16
  br label %if.end6

if.else:                                          ; preds = %if.then
  %add5 = add i64 %var, 32
  br label %if.end6

if.end6:                                          ; preds = %entry, %if.then4,
%if.else
  %var.addr.0 = phi i64 [ %add, %if.then4 ], [ %add5, %if.else ], [ %var,
%entry ]
  ret i64 %var.addr.0
}

Command line:

llc  < %s -march=mips64el -mcpu=mips64r2 -o test.S

-- 
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/20160419/4fab9868/attachment.html>


More information about the llvm-bugs mailing list