[llvm] [AMDGPU] expand-fp: Change frem expansion criterion (PR #158285)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 12 18:18:30 PDT 2025


================
@@ -1000,8 +1008,8 @@ static bool runImpl(Function &F, const TargetLowering &TLI,
   if (ExpandFpConvertBits != llvm::IntegerType::MAX_INT_BITS)
     MaxLegalFpConvertBitWidth = ExpandFpConvertBits;
 
-  if (MaxLegalFpConvertBitWidth >= llvm::IntegerType::MAX_INT_BITS)
----------------
arsenm wrote:

We wouldn't have to solve this problem if we could demote frem to an intrinsic. 

Given the pass has to explicitly handle certain types, you might as well just handle those ones. It gets uglier when you start to consider vectors.

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


More information about the llvm-commits mailing list