[LLVMbugs] [Bug 15583] New: missed optimization: i > 0xffff || i*4 > 0xffff

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 25 04:37:47 PDT 2013


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

            Bug ID: 15583
           Summary: missed optimization: i > 0xffff || i*4 > 0xffff
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: felix-llvm at fefe.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Consider this test code:

int foo(unsigned int i) {
  if (i > 0xffff || i*4 > 0xffff)
    baz();
}

clang/llvm generates two compare and one shift.

I was hoping it would generate something like one compare with 0x3fff.

-- 
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/20130325/01de5d43/attachment.html>


More information about the llvm-bugs mailing list