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

            Bug ID: 27203
           Summary: [ppc] hoist repeated constant for better code size and
                    speed
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: PowerPC
          Assignee: unassignedb...@nondot.org
          Reporter: spatel+l...@rotateright.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Filing a sentimental PPC sibling report for bug 27202:

define i1 @foo(i32 %i) {
  %and = and i32 %i, 305419896
  %cmp = icmp eq i32 %and, 305419896
  ret i1 %cmp
}

$ ./llc maskcmp.ll -mtriple=powerpc64 -o - 
...
    lis 4, 4660
    ori 4, 4, 22136
    and 3, 3, 4
    xoris 3, 3, 4660     <--- why bother?
    cmplwi     3, 22136    <--- use cmplw instead
    li 3, 1
    bclr 12, 2, 0
# BB#1:
    li 3, 0
    blr

-- 
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