Skip to content

Commit

Permalink
Ignore bcast root for mad pattern
Browse files Browse the repository at this point in the history
There are no reasons to apply any restrictions on bcast root since emit() mad will only consider the afterbitcast value.
  • Loading branch information
KorovinVlad authored and igcbot committed Aug 18, 2023
1 parent e825e7f commit c339f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IGC/VectorCompiler/lib/GenXCodeGen/GenXPatternMatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ void GenXPatternMatch::visitSelectInst(SelectInst &I) {

// Trace the def-use chain and return the first non up-cast related value.
static Value *getEffectiveValueUp(Value *V) {
if (isa<ZExtInst>(V) || isa<SExtInst>(V) || isa<BitCastInst>(V))
if (isa<ZExtInst>(V) || isa<SExtInst>(V))
return getEffectiveValueUp(cast<Instruction>(V)->getOperand(0));

return V;
Expand Down Expand Up @@ -1125,7 +1125,7 @@ bool MadMatcher::isProfitable() const {
if (C->isZeroValue())
return false;

// Ignores upward or bit casts, which usually will be performed by copy
// Ignores upward which usually will be performed by copy
// propagation within jitter.
Value *Vals[] = {getEffectiveValueUp(Srcs[0]), getEffectiveValueUp(Srcs[1]),
getEffectiveValueUp(Srcs[2])};
Expand Down

0 comments on commit c339f13

Please sign in to comment.