Skip to content
Commit 2eb151e2 authored by Quentin Colombet's avatar Quentin Colombet
Browse files

[TargetInstrInfo] Fix the implementation of commuteInstruction to match the

comment of the API.

Relaxes the behavior of TargetInstrInfo::commuteInstruction when
TargetInstrInfo::findCommutedOpIndices returns false.

Previously TargetInstrInfo triggered a fatal error in such situation whereas based
on the comment in the API it should just return nullptr. Indeed the only
precondition that should be ensured is that the instruction must be commutable.

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