[LLVMdev] wrong codegen
Chris Lattner
sabre at nondot.org
Wed May 30 09:31:00 PDT 2007
On Wed, 30 May 2007, Dietmar Ebner wrote:
> the current release_20 branch seems to miscompile the following reduced
> testcase (not target architecture specific):
>
> #define UInt16 unsigned short
> #define UInt8 unsigned char
> UInt8 foo(UInt16 a) {
> return (UInt8)(((a >> 10) & 1) << 1);
> }
>
> it - misleadingly - optimizes the expression to something like (undef &
> 2). I guess the problem is related to the DAG combiner but I haven't
> done a thorough analysis yet.
>
> a quick search didn't bring up existing bug reports. is this a known
> problem? anybody else seeing this?
Verified, I filed this bug, I'm investigating. Thanks!
http://llvm.org/bugs/show_bug.cgi?id=1473
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list