[llvm-commits] [llvm] r133022 - in /llvm/trunk: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/shl_undef.ll
Jay Foad
jay.foad at gmail.com
Thu Jun 16 05:42:24 PDT 2011
>> IMO it would be better to change the Lang Ref so that the result of
>> "shl undef, 1" is undef.
>
> But then front-ends would not be able to output "shl" for a left-shift because
> the semantics would be wrong.
C doesn't guarantee that this function returns 0:
int f(void) {
int x; // uninitialised
return (x << 1) & 1;
}
Does it? So the semantics would be just fine. Am I missing something?
Thanks,
Jay.
More information about the llvm-commits
mailing list