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 {
159
159
160
160
// / Invert the select by inverting the condition and switching the operands.
161
161
void setInverted () {
162
- assert (!Inverted && " Trying to invert and inverted SelectLike" );
162
+ assert (!Inverted && " Trying to invert an inverted SelectLike" );
163
163
assert (isa<Instruction>(getCondition ()) &&
164
164
cast<Instruction>(getCondition ())->getOpcode () ==
165
165
Instruction::Xor);
@@ -193,6 +193,8 @@ class SelectOptimizeImpl {
193
193
// / condition of a select or c in `or(zext(c), x)`
194
194
Value *getCondition () const {
195
195
Value *CC = getNonInvertedCondition ();
196
+ // For inverted conditions the CC is checked above to be a not / xor
197
+ // instruction.
196
198
if (Inverted)
197
199
return cast<Instruction>(CC)->getOperand (0 );
198
200
return CC;
You can’t perform that action at this time.
0 commit comments