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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to