[llvm] Add constant-folding for unary NVVM intrinsics (PR #141233)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 10:19:07 PDT 2025


================
@@ -0,0 +1,646 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -passes=instsimplify -march=nvptx64 -S | FileCheck %s
+
+; Test constant-folding for various NVVM unary arithmetic intrinsics.
+
+;###############################################################
+;#                          Ceil                               #
+;###############################################################
+
+define double @test_ceil_d_1_25() {
----------------
Artem-B wrote:

I'd also add test cases for the now-removed approximate intrinsics to verify that we deliberately *not* const-folding them.

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


More information about the llvm-commits mailing list