[llvm] [InstCombine] Avoid crash on aggregate types in SimplifyDemandedUseFPClass (PR #111128)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 04:15:08 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) {
+ case fcPosZero:
+ case fcNegZero:
----------------
MacDue wrote:
I've put cases that (I think) _should_ hit these, however, `computeKnownFPClass()` only handles `ConstantAggregateZero` (and that case is now fixed), so I'm not sure it's possible to get fcPosZero, fcNegZero, etc for a constant aggregate.
https://github.com/llvm/llvm-project/pull/111128
More information about the llvm-commits
mailing list