llvm.org GIT mirror llvm / 33e17b4
PredicateInfo: Clean up predicate info a little, using insertion helpers, and fixing support for the renaming the comparison. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295581 91177308-0d34-0410-b5e6-96231b3b80d8 Daniel Berlin 2 years ago
4 changed file(s) with 124 addition(s) and 89 deletion(s). Raw diff Collapse all Expand all
102102 // This can be use by passes, when destroying predicateinfo, to know
103103 // whether they can just drop the intrinsic, or have to merge metadata.
104104 Value *OriginalOp;
105 CmpInst *Comparison;
105 Value *Condition;
106106 PredicateBase(const PredicateBase &) = delete;
107107 PredicateBase &operator=(const PredicateBase &) = delete;
108108 PredicateBase() = delete;
109109 virtual ~PredicateBase() = default;
110110
111111 protected:
112 PredicateBase(PredicateType PT, Value *Op, CmpInst *Comparison)
113 : Type(PT), OriginalOp(Op), Comparison(Comparison) {}
112 PredicateBase(PredicateType PT, Value *Op, Value *Condition)
113 : Type(PT), OriginalOp(Op), Condition(Condition) {}
114114 };
115115
116116 // Provides predicate information for assumes. Since assumes are always true,
119119 class PredicateAssume : public PredicateBase {
120120 public:
121121 IntrinsicInst *AssumeInst;
122 PredicateAssume(Value *Op, IntrinsicInst *AssumeInst, CmpInst *Comparison)
123 : PredicateBase(PT_Assume, Op, Comparison), AssumeInst(AssumeInst) {}
122 PredicateAssume(Value *Op, IntrinsicInst *AssumeInst, Value *Condition)
123 : PredicateBase(PT_Assume, Op, Condition), AssumeInst(AssumeInst) {}
124124 PredicateAssume() = delete;
125125 static inline bool classof(const PredicateBase *PB) {
126126 return PB->Type == PT_Assume;
130130 // Provides predicate information for branches.
131131 class PredicateBranch : public PredicateBase {
132132 public:
133 // This is the block that is conditional upon the comparison.
133 // This is the block that is conditional upon the condition.
134134 BasicBlock *BranchBB;
135135 // This is one of the true/false successors of BranchBB.
136136 BasicBlock *SplitBB;
137137 // If true, SplitBB is the true successor, otherwise it's the false successor.
138138 bool TrueEdge;
139139 PredicateBranch(Value *Op, BasicBlock *BranchBB, BasicBlock *SplitBB,
140 CmpInst *Comparison, bool TakenEdge)
141 : PredicateBase(PT_Branch, Op, Comparison), BranchBB(BranchBB),
140 Value *Condition, bool TakenEdge)
141 : PredicateBase(PT_Branch, Op, Condition), BranchBB(BranchBB),
142142 SplitBB(SplitBB), TrueEdge(TakenEdge) {}
143143 PredicateBranch() = delete;
144144 static inline bool classof(const PredicateBase *PB) {
196196 bool stackIsInScope(const ValueDFSStack &, const ValueDFS &) const;
197197 void popStackUntilDFSScope(ValueDFSStack &, const ValueDFS &);
198198 ValueInfo &getOrCreateValueInfo(Value *);
199 void addInfoFor(SmallPtrSetImpl &OpsToRename, Value *Op,
200 PredicateBase *PB);
199201 const ValueInfo &getValueInfo(Value *) const;
200202 Function &F;
201203 DominatorTree &DT;
216218 DenseMap> OBBMap;
217219 // The set of edges along which we can only handle phi uses, due to critical
218220 // edges.
219 DenseSet<BasicBlockEdge> PhiUsesOnly;
221 DenseSet<std::pair> EdgeUsesOnly;
220222 };
221223
222224 // This pass does eager building and then printing of PredicateInfo. It is used
6868 // Only one of Def or Use will be set.
6969 Value *Def = nullptr;
7070 Use *U = nullptr;
71 // Neither PInfo nor PhiOnly participate in the ordering
71 // Neither PInfo nor EdgeOnly participate in the ordering
7272 PredicateBase *PInfo = nullptr;
73 bool PhiOnly = false;
73 bool EdgeOnly = false;
7474 };
7575
7676 // This compares ValueDFS structures, creating OrderedBasicBlocks where
194194 return false;
195195 // If it's a phi only use, make sure it's for this phi node edge, and that the
196196 // use is in a phi node. If it's anything else, and the top of the stack is
197 // phionly, we need to pop the stack. We deliberately sort phi uses next to
197 // EdgeOnly, we need to pop the stack. We deliberately sort phi uses next to
198198 // the defs they must go with so that we can know it's time to pop the stack
199199 // when we hit the end of the phi uses for a given def.
200 if (Stack.back().PhiOnly) {
200 if (Stack.back().EdgeOnly) {
201201 if (!VDUse.U)
202202 return false;
203203 auto *PHI = dyn_cast(VDUse.U->getUser());
204204 if (!PHI)
205205 return false;
206 // The only phionly defs should be branch info.
206 // The only EdgeOnly defs should be branch info.
207207 auto *PBranch = dyn_cast(Stack.back().PInfo);
208 assert(PBranch && "Only branches should have PHIOnly defs");
209 // Check edge
208 assert(PBranch && "Only branches should have EdgeOnly defs");
209 // Check edge matches us.
210210 BasicBlock *EdgePred = PHI->getIncomingBlock(*VDUse.U);
211211 if (EdgePred != PBranch->BranchBB)
212212 return false;
213
214 // Use dominates, which knows how to handle edge dominance.
215 return DT.dominates(BasicBlockEdge(PBranch->BranchBB, PBranch->SplitBB),
216 *VDUse.U);
213217 }
214218
215219 return (VDUse.DFSIn >= Stack.back().DFSIn &&
266270 // are only being used in the comparison, which means they will not be useful
267271 // for us to consider for predicateinfo.
268272 //
269 // FIXME: LLVM crashes trying to create an intrinsic declaration of some
270 // pointer to function types that return structs, so we avoid them.
271 if ((isa(Op0) || isa(Op0)) && !Op0->hasOneUse() &&
272 !(Op0->getType()->isPointerTy() &&
273 Op0->getType()->getPointerElementType()->isFunctionTy()))
273 if ((isa(Op0) || isa(Op0)) && !Op0->hasOneUse())
274274 CmpOperands.push_back(Op0);
275 if ((isa(Op1) || isa(Op1)) && !Op1->hasOneUse() &&
276 !(Op1->getType()->isPointerTy() &&
277 Op1->getType()->getPointerElementType()->isFunctionTy()))
275 if ((isa(Op1) || isa(Op1)) && !Op1->hasOneUse())
278276 CmpOperands.push_back(Op1);
277 }
278
279 // Add Op, PB to the list of value infos for Op, and mark Op to be renamed.
280 void PredicateInfo::addInfoFor(SmallPtrSetImpl &OpsToRename, Value *Op,
281 PredicateBase *PB) {
282 OpsToRename.insert(Op);
283 auto &OperandInfo = getOrCreateValueInfo(Op);
284 AllInfos.push_back(PB);
285 OperandInfo.Infos.push_back(PB);
279286 }
280287
281288 // Process an assume instruction and place relevant operations we want to rename
282289 // into OpsToRename.
283290 void PredicateInfo::processAssume(IntrinsicInst *II, BasicBlock *AssumeBB,
284291 SmallPtrSetImpl &OpsToRename) {
292 // See if we have a comparison we support
285293 SmallVector CmpOperands;
286 // Second, see if we have a comparison we support
287 SmallVector ComparisonsToProcess;
294 SmallVector ConditionsToProcess;
288295 CmpInst::Predicate Pred;
289296 Value *Operand = II->getOperand(0);
290297 if (m_c_And(m_Cmp(Pred, m_Value(), m_Value()),
291298 m_Cmp(Pred, m_Value(), m_Value()))
292299 .match(II->getOperand(0))) {
293 ComparisonsToProcess.push_back(
294 cast(Operand)->getOperand(0));
295 ComparisonsToProcess.push_back(
296 cast(Operand)->getOperand(1));
297 } else {
298 ComparisonsToProcess.push_back(Operand);
299 }
300 for (auto Comparison : ComparisonsToProcess) {
301 if (auto *Cmp = dyn_cast(Comparison)) {
300 ConditionsToProcess.push_back(cast(Operand)->getOperand(0));
301 ConditionsToProcess.push_back(cast(Operand)->getOperand(1));
302 ConditionsToProcess.push_back(Operand);
303 } else if (isa(Operand)) {
304
305 ConditionsToProcess.push_back(Operand);
306 }
307 for (auto Cond : ConditionsToProcess) {
308 if (auto *Cmp = dyn_cast(Cond)) {
302309 collectCmpOps(Cmp, CmpOperands);
303310 // Now add our copy infos for our operands
304311 for (auto *Op : CmpOperands) {
305 OpsToRename.insert(Op);
306 auto &OperandInfo = getOrCreateValueInfo(Op);
307 PredicateBase *PB = new PredicateAssume(Op, II, Cmp);
308 AllInfos.push_back(PB);
309 OperandInfo.Infos.push_back(PB);
312 auto *PA = new PredicateAssume(Op, II, Cmp);
313 addInfoFor(OpsToRename, Op, PA);
310314 }
311315 CmpOperands.clear();
316 } else if (auto *BinOp = dyn_cast(Cond)) {
317 // Otherwise, it should be an AND.
318 assert(BinOp->getOpcode() == Instruction::And &&
319 "Should have been an and");
320 auto *PA = new PredicateAssume(Cond, II, Cond);
321 addInfoFor(OpsToRename, Cond, PA);
322 } else {
323 llvm_unreachable("Unknown type of condition");
312324 }
313325 }
314326 }
317329 // renamed into OpsToRename.
318330 void PredicateInfo::processBranch(BranchInst *BI, BasicBlock *BranchBB,
319331 SmallPtrSetImpl &OpsToRename) {
320 SmallVector CmpOperands;
321332 BasicBlock *FirstBB = BI->getSuccessor(0);
322333 BasicBlock *SecondBB = BI->getSuccessor(1);
323334 SmallVector SuccsToProcess;
335 SuccsToProcess.push_back(FirstBB);
336 SuccsToProcess.push_back(SecondBB);
337 SmallVector ConditionsToProcess;
338
339 auto InsertHelper = [&](Value *Op, bool isAnd, bool isOr, Value *Cond) {
340 for (auto *Succ : SuccsToProcess) {
341 // Don't try to insert on a self-edge. This is mainly because we will
342 // eliminate during renaming anyway.
343 if (Succ == BranchBB)
344 continue;
345 bool TakenEdge = (Succ == FirstBB);
346 // For and, only insert on the true edge
347 // For or, only insert on the false edge
348 if ((isAnd && !TakenEdge) || (isOr && TakenEdge))
349 continue;
350 PredicateBase *PB =
351 new PredicateBranch(Op, BranchBB, Succ, Cond, TakenEdge);
352 addInfoFor(OpsToRename, Op, PB);
353 if (!Succ->getSinglePredecessor())
354 EdgeUsesOnly.insert({BranchBB, Succ});
355 }
356 };
357
358 // Match combinations of conditions.
359 CmpInst::Predicate Pred;
324360 bool isAnd = false;
325361 bool isOr = false;
326 SuccsToProcess.push_back(FirstBB);
327 SuccsToProcess.push_back(SecondBB);
328 // Second, see if we have a comparison we support
329 SmallVector ComparisonsToProcess;
330 CmpInst::Predicate Pred;
331
332 // Match combinations of conditions.
362 SmallVector CmpOperands;
333363 if (match(BI->getCondition(), m_And(m_Cmp(Pred, m_Value(), m_Value()),
334364 m_Cmp(Pred, m_Value(), m_Value()))) ||
335365 match(BI->getCondition(), m_Or(m_Cmp(Pred, m_Value(), m_Value()),
339369 isAnd = true;
340370 else if (BinOp->getOpcode() == Instruction::Or)
341371 isOr = true;
342 ComparisonsToProcess.push_back(BinOp->getOperand(0));
343 ComparisonsToProcess.push_back(BinOp->getOperand(1));
344 } else {
345 ComparisonsToProcess.push_back(BI->getCondition());
346 }
347 for (auto Comparison : ComparisonsToProcess) {
348 if (auto *Cmp = dyn_cast(Comparison)) {
372 ConditionsToProcess.push_back(BinOp->getOperand(0));
373 ConditionsToProcess.push_back(BinOp->getOperand(1));
374 ConditionsToProcess.push_back(BI->getCondition());
375 } else if (isa(BI->getCondition())) {
376 ConditionsToProcess.push_back(BI->getCondition());
377 }
378 for (auto Cond : ConditionsToProcess) {
379 if (auto *Cmp = dyn_cast(Cond)) {
349380 collectCmpOps(Cmp, CmpOperands);
350381 // Now add our copy infos for our operands
351 for (auto *Op : CmpOperands) {
352 OpsToRename.insert(Op);
353 auto &OperandInfo = getOrCreateValueInfo(Op);
354 for (auto *Succ : SuccsToProcess) {
355 bool TakenEdge = (Succ == FirstBB);
356 // For and, only insert on the true edge
357 // For or, only insert on the false edge
358 if ((isAnd && !TakenEdge) || (isOr && TakenEdge))
359 continue;
360 PredicateBase *PB =
361 new PredicateBranch(Op, BranchBB, Succ, Cmp, TakenEdge);
362 AllInfos.push_back(PB);
363 OperandInfo.Infos.push_back(PB);
364 if (!Succ->getSinglePredecessor())
365 PhiUsesOnly.insert({BranchBB, Succ});
366 }
367 }
368 CmpOperands.clear();
369 }
382 for (auto *Op : CmpOperands)
383 InsertHelper(Op, isAnd, isOr, Cmp);
384 } else if (auto *BinOp = dyn_cast(Cond)) {
385 // This must be an AND or an OR.
386 assert((BinOp->getOpcode() == Instruction::And ||
387 BinOp->getOpcode() == Instruction::Or) &&
388 "Should have been an AND or an OR");
389 // The actual value of the binop is not subject to the same restrictions
390 // as the comparison. It's either true or false on the true/false branch.
391 InsertHelper(Cond, false, false, Cond);
392 } else {
393 llvm_unreachable("Unknown type of condition");
394 }
395 CmpOperands.clear();
370396 }
371397 }
372398
420446 IRBuilder<> B(PBranch->BranchBB->getTerminator());
421447 Function *IF = Intrinsic::getDeclaration(
422448 F.getParent(), Intrinsic::ssa_copy, Op->getType());
423 Value *PIC = B.CreateCall(IF, Op, Op->getName() + "." + Twine(Counter++));
449 CallInst *PIC =
450 B.CreateCall(IF, Op, Op->getName() + "." + Twine(Counter++));
424451 PredicateMap.insert({PIC, ValInfo});
425452 Result.Def = PIC;
426453 } else {
430457 IRBuilder<> B(PAssume->AssumeInst);
431458 Function *IF = Intrinsic::getDeclaration(
432459 F.getParent(), Intrinsic::ssa_copy, Op->getType());
433 Value *PIC = B.CreateCall(IF, Op);
460 CallInst *PIC = B.CreateCall(IF, Op);
434461 PredicateMap.insert({PIC, ValInfo});
435462 Result.Def = PIC;
436463 }
488515 // If we can only do phi uses, we treat it like it's in the branch
489516 // block, and handle it specially. We know that it goes last, and only
490517 // dominate phi uses.
491 if (PhiUsesOnly.count({PBranch->BranchBB, PBranch->SplitBB})) {
518 if (EdgeUsesOnly.count({PBranch->BranchBB, PBranch->SplitBB})) {
492519 VD.LocalNum = LN_Last;
493520 auto *DomNode = DT.getNode(PBranch->BranchBB);
494521 if (DomNode) {
495522 VD.DFSIn = DomNode->getDFSNumIn();
496523 VD.DFSOut = DomNode->getDFSNumOut();
497524 VD.PInfo = PossibleCopy;
498 VD.PhiOnly = true;
525 VD.EdgeOnly = true;
499526 OrderedUses.push_back(VD);
500527 }
501528 } else {
539566 if (OutOfScope || ShouldPush) {
540567 // Sync to our current scope.
541568 popStackUntilDFSScope(RenameStack, VD);
542 ShouldPush |= (VD.Def || PossibleCopy);
543569 if (ShouldPush) {
544570 RenameStack.push_back(VD);
545571 }
654680 OS << "; Has predicate info\n";
655681 if (const auto *PB = dyn_cast(PI))
656682 OS << "; branch predicate info { TrueEdge: " << PB->TrueEdge
657 << " Comparison:" << *PB->Comparison << " }\n";
683 << " Comparison:" << *PB->Condition << " }\n";
658684 else if (const auto *PA = dyn_cast(PI))
659685 OS << "; assume predicate info {"
660 << " Comparison:" << *PA->Comparison << " }\n";
686 << " Comparison:" << *PA->Condition << " }\n";
661687 }
662688 }
663689 };
101101 ; CHECK: [[X_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[X]])
102102 ; CHECK: [[YZ_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[YZ]])
103103 ; CHECK: [[Y_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[Y]])
104 ; CHECK: [[Z_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[Z]])
104105 ; CHECK-NEXT: br i1 [[Z]], label [[BOTH_ZERO:%.*]], label [[NOPE:%.*]]
105106 ; CHECK: both_zero:
106107 ; CHECK-NEXT: call void @foo(i1 [[XZ_0]])
109110 ; CHECK-NEXT: call void @bar(i32 [[Y_0]])
110111 ; CHECK-NEXT: ret void
111112 ; CHECK: nope:
112 ; CHECK-NEXT: call void @foo(i1 [[Z]])
113 ; CHECK-NEXT: call void @foo(i1 [[Z_0]])
113114 ; CHECK-NEXT: ret void
114115 ;
115116 %xz = icmp eq i32 %x, 0
1313 ; CHECK: [[X_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[X]])
1414 ; CHECK: [[YZ_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[YZ]])
1515 ; CHECK: [[Y_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[Y]])
16 ; CHECK: [[Z_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[Z]])
1617 ; CHECK-NEXT: br i1 [[Z]], label [[ONEOF:%.*]], label [[NEITHER:%.*]]
1718 ; CHECK: oneof:
1819 ; CHECK-NEXT: call void @foo(i1 [[XZ]])
2526 ; CHECK-NEXT: call void @foo(i1 [[YZ_0]])
2627 ; CHECK-NEXT: call void @bar(i32 [[X_0]])
2728 ; CHECK-NEXT: call void @bar(i32 [[Y_0]])
28 ; CHECK-NEXT: call void @foo(i1 [[Z]])
29 ; CHECK-NEXT: call void @foo(i1 [[Z_0]])
2930 ; CHECK-NEXT: ret void
3031 ;
3132 %xz = icmp eq i32 %x, 0
5657 ; CHECK: [[X_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[X]])
5758 ; CHECK: [[YZ_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[YZ]])
5859 ; CHECK: [[Y_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[Y]])
60 ; CHECK: [[Z_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[Z]])
5961 ; CHECK-NEXT: br i1 [[Z]], label [[BOTH:%.*]], label [[NOPE:%.*]]
6062 ; CHECK: both:
6163 ; CHECK-NEXT: call void @foo(i1 [[XZ_0]])
6870 ; CHECK-NEXT: call void @foo(i1 [[YZ]])
6971 ; CHECK-NEXT: call void @bar(i32 [[X]])
7072 ; CHECK-NEXT: call void @bar(i32 [[Y]])
71 ; CHECK-NEXT: call void @foo(i1 [[Z]])
73 ; CHECK-NEXT: call void @foo(i1 [[Z_0]])
7274 ; CHECK-NEXT: ret void
7375 ;
7476 %xz = icmp eq i32 %x, 0
99101 ; CHECK: [[X_0:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[X]])
100102 ; CHECK: [[X_0_1:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[X_0]])
101103 ; CHECK: [[XLT_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[XLT]])
104 ; CHECK: [[Z_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[Z]])
102105 ; CHECK-NEXT: br i1 [[Z]], label [[BOTH:%.*]], label [[NOPE:%.*]]
103106 ; CHECK: both:
104107 ; CHECK-NEXT: call void @foo(i1 [[XGT_0]])
108111 ; CHECK: nope:
109112 ; CHECK-NEXT: call void @foo(i1 [[XGT]])
110113 ; CHECK-NEXT: call void @foo(i1 [[XLT]])
111 ; CHECK-NEXT: call void @foo(i1 [[Z]])
114 ; CHECK-NEXT: call void @foo(i1 [[Z_0]])
112115 ; CHECK-NEXT: ret void
113116 ;
114117 %xgt = icmp sgt i32 %x, 0
136139 ; CHECK: [[TMP2:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[X]])
137140 ; CHECK: [[TMP3:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[YZ]])
138141 ; CHECK: [[TMP4:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[Y]])
139 ; CHECK-NEXT: call void @llvm.assume(i1 [[Z]])
142 ; CHECK: [[TMP5:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[Z]])
143 ; CHECK-NEXT: call void @llvm.assume(i1 [[TMP5]])
140144 ; CHECK: [[DOT0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[TMP1]])
141145 ; CHECK: [[DOT01:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[TMP2]])
142146 ; CHECK: [[DOT02:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[TMP3]])
143147 ; CHECK: [[DOT03:%.*]] = call i32 @llvm.ssa.copy.i32(i32 [[TMP4]])
144 ; CHECK-NEXT: br i1 [[Z]], label [[BOTH:%.*]], label [[NOPE:%.*]]
148 ; CHECK: [[DOT04:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[TMP5]])
149 ; CHECK-NEXT: br i1 [[TMP5]], label [[BOTH:%.*]], label [[NOPE:%.*]]
145150 ; CHECK: both:
146151 ; CHECK-NEXT: call void @foo(i1 [[DOT0]])
147152 ; CHECK-NEXT: call void @foo(i1 [[DOT02]])
149154 ; CHECK-NEXT: call void @bar(i32 [[DOT03]])
150155 ; CHECK-NEXT: ret void
151156 ; CHECK: nope:
152 ; CHECK-NEXT: call void @foo(i1 [[Z]])
157 ; CHECK-NEXT: call void @foo(i1 [[DOT04]])
153158 ; CHECK-NEXT: ret void
154159 ;
155160 %xz = icmp eq i32 %x, 0
176181 ; CHECK-NEXT: [[YZ:%.*]] = icmp eq i32 [[Y:%.*]], 0
177182 ; CHECK-NEXT: [[Z:%.*]] = or i1 [[XZ]], [[YZ]]
178183 ; CHECK-NEXT: call void @llvm.assume(i1 [[Z]])
184 ; CHECK: [[Z_0:%.*]] = call i1 @llvm.ssa.copy.i1(i1 [[Z]])
179185 ; CHECK-NEXT: br i1 [[Z]], label [[BOTH:%.*]], label [[NOPE:%.*]]
180186 ; CHECK: both:
181187 ; CHECK-NEXT: call void @foo(i1 [[XZ]])
184190 ; CHECK-NEXT: call void @bar(i32 [[Y]])
185191 ; CHECK-NEXT: ret void
186192 ; CHECK: nope:
187 ; CHECK-NEXT: call void @foo(i1 [[Z]])
193 ; CHECK-NEXT: call void @foo(i1 [[Z_0]])
188194 ; CHECK-NEXT: ret void
189195 ;
190196 %xz = icmp eq i32 %x, 0