[SLPVectorizer] Check that lowered type is floating point before calling isFabsFree
In the case of soft-fp (e.g. fp128 under wasm) the result of getTypeLegalizationCost() can be an integer type even if the input is floating point (See LegalizeTypeAction::TypeSoftenFloat). Before calling isFabsFree() (which asserts if given a non-fp type) we need to check that that result is fp. This is safe since in fabs is certainly not free in the soft-fp case. Fixes PR39168 Differential Revision: https://reviews.llvm.org/D52899 llvm-svn: 344069
Loading
Please sign in to comment