[llvm] [NVPTX] Constant fold NVVM fmin and fmax (PR #121966)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 14:01:49 PST 2025


================
@@ -38,9 +38,8 @@ enum class TMAReductionOp : uint8_t {
   XOR = 7,
 };
 
-inline bool IntrinsicShouldFTZ(Intrinsic::ID IntrinsicID) {
+inline bool FloatToIntIntrinsicShouldFTZ(Intrinsic::ID IntrinsicID) {
----------------
Artem-B wrote:

I do agree with Alex' suggestion, just pointing out that the name of the function should match what it does. Right now it does not.

> I've changed these helper functions all to have explicit checks for all entries in the sets now, which means there are roughly double the number of case statements needed in this file.

I would say that those would be there for a reason. they wold also make it possible to add an assertion that we're not using them unintentionally for an intrinsic they were not intended for, which is too easy to do with intrinsic identifiers.


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


More information about the llvm-commits mailing list