[llvm] [InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (PR #114278)
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 14:55:22 PST 2024
================
@@ -1773,17 +1773,33 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN) {
if (NumPHIValues == 0)
return nullptr;
- // We normally only transform phis with a single use. However, if a PHI has
- // multiple uses and they are all the same operation, we can fold *all* of the
- // uses into the PHI.
+ // We normally only transform phis with a single use.
+ bool AllUsesIdentical = false;
+ bool MultipleUses = false;
----------------
MatzeB wrote:
In principle we can add more exceptions in the future to allow multiple uses in more situations, so I used the more generic name. Anyway will rename to `MultipleShuffleVectorUses` then as we can always rename in the future when someone actually allows more cases...
https://github.com/llvm/llvm-project/pull/114278
More information about the llvm-commits
mailing list