[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

Kevin P. Neal via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 12:39:19 PST 2025


kpneal wrote:

I do think that before we start adding in code like this ticket we need to add IR Verifier code to check for proper use of the strictfp attribute. This code never made it into the tree because there are too many broken tests already in the tree.

Verifier code could be written that only fires when an error is detected AND no constrained intrinsics are used in a function. This should eliminate failures from most, but not all, of the currently broken tests. Hopefully the few broken tests that are in tree and fire will be small enough that they can be fixed. The remainder of the broken tests will be corrected over time or will simply be removed.

My ticket that never got pushed is here: https://reviews.llvm.org/D146845

I can provide a current version of that code if it would be useful.

I also have checks that are implemented on top of that code to ensure that regular FP instructions are never mixed with constrained intrinsics. We'll need to push something like that hopefully not long after we start putting this bundle support into the tree. 

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


More information about the llvm-commits mailing list