[llvm] [NVPTX] Add IR pass for FMA transformation in the llc pipeline (PR #154735)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 15:49:28 PST 2025


================
@@ -0,0 +1,161 @@
+//===------ NVPTXIRPeephole.cpp - NVPTX IR Peephole --------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements FMA folding for float/double type for NVPTX. It folds
----------------
Artem-B wrote:

Considering that the file has pretty generic name, it would imply that FMA folding is just one of the peephole optimizations that will live here. I'd rephrase the comment along the lines of:
```
Tis file implements following peephole optimizations on IR level.
... add the details on when in the pipeline it's intended to kick in...
... enumerate the individual peephole optimizations. In this case just FMA folding.
```

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


More information about the llvm-commits mailing list