Commit 73f255b8 authored by Craig Topper's avatar Craig Topper
Browse files

[TargetLowering] Add getBooleanContents contents check to "SETCC (SETCC),...

[TargetLowering] Add getBooleanContents contents check to "SETCC (SETCC), [0|1], [EQ|NE]  -> SETCC" combine.

This combine is only valid if the inner setcc produces a 0/1 result
or the inner type is MVT::i1.

I haven't seen this cause any issues, just happened to notice it
while reviewing combines in this function.

While there also fix another call to use the value type from the
SDValue for the operand instead of calling SDNode::getValueType(0).
Though its likely the use is result 0, its not guaranteed.
parent 174967f1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment