llvm-project
09bd12cc - [CIR] Add nofpclass for fast-math flags (#191455)

Commit
19 days ago
[CIR] Add nofpclass for fast-math flags (#191455) When `-menable-no-infs` or `-menable-no-nans` is set, OGCG adds `nofpclass(nan inf)` to FP arguments and return values. CIR was missing this. Adds the check in `constructFunctionReturnAttributes` and `constructFunctionArgumentAttributes`, gated on `hasFloatingRepresentation()` (same condition classic codegen uses in `canApplyNoFPClass`). The MLIR LLVM dialect already has `llvm.nofpclass` from #188374, so only the CIRGen side is needed here. Test covers float, double, `_Complex double`, and a non-FP control case. Made with [Cursor](https://cursor.com)
Author
Parents
Loading