[llvm] [IR] Allow fast math flags on calls with homogeneous FP struct types (PR #110506)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 07:29:34 PDT 2024


================
@@ -351,8 +352,17 @@ class FPMathOperator : public Operator {
     case Instruction::Select:
     case Instruction::Call: {
       Type *Ty = V->getType();
-      while (ArrayType *ArrTy = dyn_cast<ArrayType>(Ty))
-        Ty = ArrTy->getElementType();
+      TypeSwitch<Type *>(Ty)
----------------
nikic wrote:

Please use explicit checks here. We don't really use TypeSwitch in LLVM, and I don't want it pulled into a core header.

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


More information about the llvm-commits mailing list