Skip to content

Commit 0b7e99d

Browse files
committed
Address comments
1 parent 10d4675 commit 0b7e99d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/CodeGen/SelectOptimize.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)