If the truncation has been pushed past the or-node, look through it and truncate afterwards.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, though it'd be interesting to see if there's any other cases where (FOO (ROTATE pattern) [...]) gets torn apart besides FOO == truncate.
Comment Actions
Yup, there's likely something more general that we could match, but it's also worth taking this as is.
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
4657 | Do you need to check that LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()? |
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
4657 | Sorry, just hit commit before I saw this. You're right, I need to check that. |
lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
4657 | r319695 |
Do you need to check that LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()?