[llvm] [AArch64] Optimize more floating-point round+convert combinations into fcvt instructions (PR #170018)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 08:14:04 PST 2025


valadaptive wrote:

I've added tests for non-saturating conversions, and also for GlobalISel, which turned out to be a bit of a hassle.

Unlike SelectionDAG, GlobalISel does *not* lower libcalls to intrinsics automatically, so I had to update the `round-fpto[su]i-sat-scalar.ll` tests to use the rounding intrinsics instead of libcalls. This is also being done as part of https://github.com/llvm/llvm-project/pull/171288, so this PR will probably conflict with that.

As part of this, I discovered that the necessary pattern for GlobalISel was apparently missing entirely from `FPToIntegerPats`. I adapted it from `FPToIntegerSatPats` above.

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


More information about the llvm-commits mailing list