Other calls to DAGCombiner::*PromoteOperand check the result, but here it could cause an assertion in getNode. Falling back to any extend in this case instead of failing outright seems correct to me.
Details
Details
Diff Detail
Diff Detail
- Build Status
Buildable 6833 Build 6833: arc lint + arc unit
Event Timeline
Comment Actions
Did you find a place where this fails? If so, it would be better to add that test case.
Comment Actions
I would have, but it was triggered by an out of tree backend. In order to trigger it, a backend would need to overload TargetLowering::IsDesirableToPromoteOp to return true for a type for which ISD::SIGN_EXTEND_INREG is marked illegal. In tree, only X86 overloads and sometimes returns true for MVT::i16 yet it marks setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::i16 , Legal);.