[llvm] [InstCombine] Don't convert a compare+select into a minnum/maxnum intrinsic that can't be lowered back to a compare+select (PR #177821)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 25 06:44:07 PST 2026
https://github.com/arsenm commented:
I actually started looking at removing this transform altogether the other day. I don't think it's a reasonable canonicalization to make. The exact choice is target dependent. If the fast math flags ever get lost in the optimizer, the resulting codegen will be worse than if you did nothing. This is potentially over constraining and I don't think there's any reason to prefer any of the intrinsics over the other. Compare and select it a reasonable compromise, and we try to reassemble these during codegen anyway
https://github.com/llvm/llvm-project/pull/177821
More information about the llvm-commits
mailing list