[LLVMbugs] [Bug 15340] New: Missed select threading case

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Feb 23 10:32:30 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=15340

            Bug ID: 15340
           Summary: Missed select threading case
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Loop Optimizer
          Assignee: unassignedbugs at nondot.org
          Reporter: benny.kra at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Found this while looking at disassembly of a hot method in clang:


int *f(int *);

void foo(int *x, int *y) {
  while (x != 0) {
    x = f(x);
    x = x == y ? x : 0;
  }
}

void bar(int *x, int *y) {
  while (x != 0) {
    x = f(x);
    if (x == y)
      break;
  }
}


icc and gcc turn these two into virtually identical code, LLVM emits a cmov
contraption for foo().

-- 
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/20130223/bfa079f3/attachment.html>


More information about the llvm-bugs mailing list