[llvm-bugs] [Bug 28567] New: [IPRA] Reg Usage Info Collector too aggressive.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 14 23:20:42 PDT 2016


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

            Bug ID: 28567
           Summary: [IPRA] Reg Usage Info Collector too aggressive.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Register Allocator
          Assignee: unassignedbugs at nondot.org
          Reporter: zyfwong at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

==== arm.c ====

char add(char b)
{
  return b + 1;
}

==== arm.ll =====
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv4t--"

; Function Attrs: minsize norecurse nounwind optsize readnone
define arm_aapcscc zeroext i8 @add(i8 zeroext %b) {
entry:
  %conv = zext i8 %b to i32
  %add = add nuw nsw i32 %conv, 1
  %conv1 = trunc i32 %add to i8
  ret i8 %conv1
}

==== arm.s =====
add:                                    @ @add
    .fnstart
@ BB#0:                                 @ %entry
    add    r0, r0, #1
    and    r0, r0, #255
    bx    lr



$ llc -march=arm arm.ll -enable-ipra=true -print-regusage
add Clobbered Registers: R0 R1 R0_R1 

I think it should be:
$ llc -march=arm arm.ll -enable-ipra=true -print-regusage
add Clobbered Registers: R0 R0_R1

-- 
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/20160715/dd42a959/attachment.html>


More information about the llvm-bugs mailing list