[all-commits] [llvm/llvm-project] 09bd12: [CIR] Add nofpclass for fast-math flags (#191455)

adams381 via All-commits all-commits at lists.llvm.org
Wed Apr 15 11:17:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09bd12cccbc0dc1b66d482a62f56e8ddc5aa1e7c
      https://github.com/llvm/llvm-project/commit/09bd12cccbc0dc1b66d482a62f56e8ddc5aa1e7c
  Author: adams381 <adams at nvidia.com>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenCall.cpp
    M clang/test/CIR/CodeGen/fp-math-precision-opts.c
    A clang/test/CIR/CodeGen/nofpclass.c

  Log Message:
  -----------
  [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)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list