[llvm] [InstSimplify] Fix Inconsistent PHI Simplification (PR #113037)

Marius Kamp via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 03:19:23 PST 2024


================
@@ -5288,6 +5288,70 @@ Value *llvm::simplifyExtractElementInst(Value *Vec, Value *Idx,
   return ::simplifyExtractElementInst(Vec, Idx, Q, RecursionLimit);
 }
 
+/// Try to fold the given arguments of a PHI function of array, struct, or
+/// vector types. Return true if this is possible and false otherwise.
+static bool getCommonPHIValueForAggregateOrVector(
----------------
mskamp wrote:

Yes, we can merge them. I've changed the select handling to just call this function.

https://github.com/llvm/llvm-project/pull/113037


More information about the llvm-commits mailing list