[llvm] [InstCombine] Avoid crash on aggregate types in SimplifyDemandedUseFPClass (PR #111128)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 03:29:05 PDT 2024


================
@@ -1919,6 +1919,19 @@ Value *InstCombinerImpl::SimplifyDemandedVectorElts(Value *V,
 /// For floating-point classes that resolve to a single bit pattern, return that
 /// value.
 static Constant *getFPClassConstant(Type *Ty, FPClassTest Mask) {
+  // TODO: Support aggregate types that are allowed by FPMathOperator.
+  switch (Mask) {
----------------
arsenm wrote:

It wasn't obvious to me why these pre-cases. Merge the switches?

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


More information about the llvm-commits mailing list