File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ class SelectOptimizeImpl {
159159
160160 // / Invert the select by inverting the condition and switching the operands.
161161 void setInverted () {
162- assert (!Inverted && " Trying to invert and inverted SelectLike" );
162+ assert (!Inverted && " Trying to invert an inverted SelectLike" );
163163 assert (isa<Instruction>(getCondition ()) &&
164164 cast<Instruction>(getCondition ())->getOpcode () ==
165165 Instruction::Xor);
@@ -193,6 +193,8 @@ class SelectOptimizeImpl {
193193 // / condition of a select or c in `or(zext(c), x)`
194194 Value *getCondition () const {
195195 Value *CC = getNonInvertedCondition ();
196+ // For inverted conditions the CC is checked above to be a not / xor
197+ // instruction.
196198 if (Inverted)
197199 return cast<Instruction>(CC)->getOperand (0 );
198200 return CC;
You can’t perform that action at this time.
0 commit comments