Skip to content
Commit d6a8f2e6 authored by Craig Topper's avatar Craig Topper
Browse files

[SelectionDAG][X86] Don't use ->getValueType(0) after a call to getOperand to...

[SelectionDAG][X86] Don't use ->getValueType(0) after a call to getOperand to get the type of the operand.

getOperand returns an SDValue that contains the node and the result number. There is no guarantee that the result number if 0. By using the -> operator we are calling SDNode::getValueType rather than SDValue::getValueType. This requires supplying a result number and we shouldn't assume it was 0.

I don't have a test case. Just noticed while cleaning up some other code and saw that it occurred in other places.

llvm-svn: 321397
parent fb59856a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment