Skip to content

Commit 6b200e2

Browse files
authored
DAG: Avoid comparing Register to unsigned 0 (#155164)
1 parent 1c1ec48 commit 6b200e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
238238

239239
// Create the result registers for this node and add the result regs to
240240
// the machine instruction.
241-
if (VRBase == 0) {
241+
if (!VRBase) {
242242
assert(RC && "Isn't a register operand!");
243243
VRBase = MRI->createVirtualRegister(RC);
244244
MIB.addReg(VRBase, RegState::Define);

0 commit comments

Comments
 (0)