[PATCH] D138180: InstCombine: Fold negations of is_fpclass intrinsics

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 04:11:02 PST 2022


sepavloff added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:3715-3717
+      II->setArgOperand(
+          1, ConstantInt::get(ClassMask->getType(),
+                              ~ClassMask->getZExtValue() & fcAllFlags));
----------------
It must work for IEEE numbers. But for non-IEEE it is possible that a value does not belong to any of the classes known to `is_fpclass`. For example, type `x86_fp80` has so-called unsupported values. Do you think this transformation can be safely applied to such numbers also or it is better to limit it to IEEE numbers only?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138180/new/

https://reviews.llvm.org/D138180



More information about the llvm-commits mailing list