[LLVMdev] wrong codegen
Dietmar Ebner
ebner at complang.tuwien.ac.at
Wed May 30 07:47:17 PDT 2007
hi,
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?
-
dietmar
More information about the llvm-dev
mailing list