[InstCombine] improve debug value names; NFC
The use of 'tmp' can trigger warnings from the update_test_checks.py script. That's evidence of a flaw in the script's logic, but we can always do better than naming variables 'tmp' in LLVM too. The phi test file should be updated with auto-generated regex CHECK lines, so it isn't affected by cosmetic diffs, but I don't have time to do that right now.
This commit is contained in:
parent
14936e01e2
commit
ef70cc9d1a
|
@ -971,7 +971,7 @@ static Value *foldOperationIntoPhiValue(BinaryOperator *I, Value *InV,
|
|||
if (!ConstIsRHS)
|
||||
std::swap(Op0, Op1);
|
||||
|
||||
Value *RI = Builder.CreateBinOp(I->getOpcode(), Op0, Op1, "phitmp");
|
||||
Value *RI = Builder.CreateBinOp(I->getOpcode(), Op0, Op1, "phi.bo");
|
||||
auto *FPInst = dyn_cast<Instruction>(RI);
|
||||
if (FPInst && isa<FPMathOperator>(FPInst))
|
||||
FPInst->copyFastMathFlags(I);
|
||||
|
@ -1076,7 +1076,7 @@ Instruction *InstCombiner::foldOpIntoPhi(Instruction &I, PHINode *PN) {
|
|||
// the select would be generated exactly once in the NonConstBB.
|
||||
Builder.SetInsertPoint(ThisBB->getTerminator());
|
||||
InV = Builder.CreateSelect(PN->getIncomingValue(i), TrueVInPred,
|
||||
FalseVInPred, "phitmp");
|
||||
FalseVInPred, "phi.sel");
|
||||
}
|
||||
NewPN->addIncoming(InV, ThisBB);
|
||||
}
|
||||
|
@ -1088,7 +1088,7 @@ Instruction *InstCombiner::foldOpIntoPhi(Instruction &I, PHINode *PN) {
|
|||
InV = ConstantExpr::getCompare(CI->getPredicate(), InC, C);
|
||||
else
|
||||
InV = Builder.CreateCmp(CI->getPredicate(), PN->getIncomingValue(i),
|
||||
C, "phitmp");
|
||||
C, "phi.cmp");
|
||||
NewPN->addIncoming(InV, PN->getIncomingBlock(i));
|
||||
}
|
||||
} else if (auto *BO = dyn_cast<BinaryOperator>(&I)) {
|
||||
|
@ -1106,7 +1106,7 @@ Instruction *InstCombiner::foldOpIntoPhi(Instruction &I, PHINode *PN) {
|
|||
InV = ConstantExpr::getCast(CI->getOpcode(), InC, RetTy);
|
||||
else
|
||||
InV = Builder.CreateCast(CI->getOpcode(), PN->getIncomingValue(i),
|
||||
I.getType(), "phitmp");
|
||||
I.getType(), "phi.cast");
|
||||
NewPN->addIncoming(InV, PN->getIncomingBlock(i));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ define i32 @sterix(i32, i8, i64) {
|
|||
; CHECK-NEXT: [[AND:%.*]] = and i64 [[MUL3]], [[TMP2]]
|
||||
; CHECK-NEXT: [[CONV4:%.*]] = trunc i64 [[AND]] to i32
|
||||
; CHECK-NEXT: [[TOBOOL7:%.*]] = icmp eq i32 [[CONV4]], 0
|
||||
; CHECK-NEXT: [[PHITMP:%.*]] = zext i1 [[TOBOOL7]] to i32
|
||||
; CHECK-NEXT: [[PHI_CAST:%.*]] = zext i1 [[TOBOOL7]] to i32
|
||||
; CHECK-NEXT: br label [[LOR_END]]
|
||||
; CHECK: lor.end:
|
||||
; CHECK-NEXT: [[TMP4:%.*]] = phi i32 [ 1, [[ENTRY:%.*]] ], [ [[PHITMP]], [[LOR_RHS]] ]
|
||||
; CHECK-NEXT: [[TMP4:%.*]] = phi i32 [ 1, [[ENTRY:%.*]] ], [ [[PHI_CAST]], [[LOR_RHS]] ]
|
||||
; CHECK-NEXT: ret i32 [[TMP4]]
|
||||
;
|
||||
entry:
|
||||
|
|
|
@ -519,9 +519,9 @@ Exit: ; preds = %Loop
|
|||
%E = add i32 %B, 19
|
||||
ret i32 %E
|
||||
; CHECK-LABEL: @test23(
|
||||
; CHECK: %phitmp = add i32 %A, 19
|
||||
; CHECK: %phi.bo = add i32 %A, 19
|
||||
; CHECK: Loop:
|
||||
; CHECK-NEXT: %B = phi i32 [ %phitmp, %BB0 ], [ 61, %Loop ]
|
||||
; CHECK-NEXT: %B = phi i32 [ %phi.bo, %BB0 ], [ 61, %Loop ]
|
||||
; CHECK: Exit:
|
||||
; CHECK-NEXT: ret i32 %B
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue