[PATCH] D159140: [GlobalISel] LegalizationArtifactCombiner: Elide redundant G_AND

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 22:58:45 PDT 2023


aemerson added a comment.

> We only emit the mask G_CONSTANT when necessary. Even when the G_AND is combined away later, the constant sometimes ends up being reused by other instructions instead of becoming dead.

I'm a bit confused by how this could happen. Does this happen with optimizations?

The wording suggests that a later transform needs a G_AND, and probably the CSEMIRBuilder returns a reference to dead one? Why would other instructions need a dead instruction?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159140/new/

https://reviews.llvm.org/D159140



More information about the llvm-commits mailing list