[llvm] [ConstantFolding] Consider `tanh*` to always be a noop (PR #70794)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 08:52:45 PST 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-ubsan` running on `sanitizer-buildbot10` while building `llvm` at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/85/builds/19486

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 95640 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: Transforms/EarlyCSE/math-1.ll (69938 of 95640)
******************** TEST 'LLVM :: Transforms/EarlyCSE/math-1.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/opt -passes=early-cse -earlycse-debug-hash -S -o - /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/opt -passes=early-cse -earlycse-debug-hash -S -o - /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# .---command stderr------------
# | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll:189:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00)
# |               ^
# | <stdin>:148:23: note: scanning from here
# | define float @f_tanhf() {
# |                       ^
# | <stdin>:149:2: note: possible intended match here
# |  ret float 0x3FE85EFAC0000000
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           143: } 
# |           144:  
# |           145: ; Function Attrs: nofree nounwind willreturn 
# |           146: declare float @tanhf(float) #0 
# |           147:  
# |           148: define float @f_tanhf() { 
# | next:189'0                           X~~~ error: no match found
Step 11 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 95640 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: LLVM :: Transforms/EarlyCSE/math-1.ll (69938 of 95640)
******************** TEST 'LLVM :: Transforms/EarlyCSE/math-1.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/opt -passes=early-cse -earlycse-debug-hash -S -o - /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/opt -passes=early-cse -earlycse-debug-hash -S -o - /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# .---command stderr------------
# | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll:189:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00)
# |               ^
# | <stdin>:148:23: note: scanning from here
# | define float @f_tanhf() {
# |                       ^
# | <stdin>:149:2: note: possible intended match here
# |  ret float 0x3FE85EFAC0000000
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           143: } 
# |           144:  
# |           145: ; Function Attrs: nofree nounwind willreturn 
# |           146: declare float @tanhf(float) #0 
# |           147:  
# |           148: define float @f_tanhf() { 
# | next:189'0                           X~~~ error: no match found
Step 14 (stage3/ubsan check) failure: stage3/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:569: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:74: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 91889 tests, 72 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.
FAIL: LLVM :: Transforms/EarlyCSE/math-1.ll (69921 of 91889)
******************** TEST 'LLVM :: Transforms/EarlyCSE/math-1.ll' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/opt -passes=early-cse -earlycse-debug-hash -S -o - /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/opt -passes=early-cse -earlycse-debug-hash -S -o - /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# note: command had no output on stdout or stderr
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/FileCheck /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# .---command stderr------------
# | /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll:189:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00)
# |               ^
# | <stdin>:148:23: note: scanning from here
# | define float @f_tanhf() {
# |                       ^
# | <stdin>:149:2: note: possible intended match here
# |  ret float 0x3FE85EFAC0000000
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/test/Transforms/EarlyCSE/math-1.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           143: } 
# |           144:  
# |           145: ; Function Attrs: nofree nounwind willreturn 
# |           146: declare float @tanhf(float) #0 
# |           147:  
# |           148: define float @f_tanhf() { 
# | next:189'0                           X~~~ error: no match found

```

</details>

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


More information about the llvm-commits mailing list