[LLVMdev] ConstantFold 'undef xor undef'
clattner at apple.com
Wed Jul 7 08:49:58 PDT 2010
On Jul 7, 2010, at 8:45 AM, Jianzhou Zhao wrote:
>> I don't really understand your question here. Are you asking about C or LLVM IR, or something else?
> Sorry for the confusion. Does ConstantFoldBinaryInstruction also fold
> x ^ y into 0 if both x and y are undef?
That's a poorly formed question. ConstantFoldBinaryInstruction doesn't do any real analysis - if there is a symbolic operand, it doesn't do the fold. It only folds when the two operands *are* undef. It has no idea if they came from the "same" variable or not.
More information about the llvm-dev