[LLVMbugs] [Bug 2716] New: integer comparison bug

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Aug 23 11:49:29 PDT 2008


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

           Summary: integer comparison bug
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu


Seen on r55218 on Ubuntu Hardy on ia32.  Perhaps the same bug as PR 2697 but
only if Eli is wrong that InstCombiner::FoldICmpDivCst is to blame for that one
(since this code does no division).

regehr at john-home:~/volatile/tmp13$ llvm-gcc -O0 small.c -o small ; ./small
1
regehr at john-home:~/volatile/tmp13$ llvm-gcc -O1 small.c -o small ; ./small
0
regehr at john-home:~/volatile/tmp13$ cat small.c

#include <stdio.h>

int func_3 (void);
int func_3 (void)
{
  long long p_5 = 0;
  signed char g_323 = 1;
  return (1 > 0x14E7A1AFC6B86DBELL) <= (p_5 - g_323);
}

int
main (void)
{
  printf ("%d\n", func_3 ());
  return 0;
}


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list