[llvm] [InstSimplify] Add basic constant folding for `llvm.sincos` (PR #114527)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 8 13:44:01 PST 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `llvm` at step 4 "annotate".

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

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

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[1350/1353] Building CXX object unittests/Transforms/Scalar/CMakeFiles/ScalarTests.dir/LoopPassManagerTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1351/1353] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[1352/1353] Running the LLVM regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/wasm-ld
-- Testing: 57233 tests, 60 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.
FAIL: LLVM :: Transforms/InstSimplify/sincos.ll (44499 of 57233)
******************** TEST 'LLVM :: Transforms/InstSimplify/sincos.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/opt -S -passes=instsimplify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/opt -S -passes=instsimplify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll:45:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> <float 1.000000e+00, float 1.000000e+00> }
              ^
<stdin>:24:60: note: scanning from here
define { <2 x float>, <2 x float> } @sincos_zero_vector() {
                                                           ^
<stdin>:25:2: note: possible intended match here
 ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> splat (float 1.000000e+00) }
 ^

Input file: <stdin>
Check file: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
          19:  
          20: define { <2 x float>, <2 x float> } @sincos_vector() { 
          21:  ret { <2 x float>, <2 x float> } { <2 x float> <float 0x3FEAED5480000000, float 0x3FED18F6E0000000>, <2 x float> <float 0x3FE14A2800000000, float 0xBFDAA22660000000> } 
          22: } 
          23:  
          24: define { <2 x float>, <2 x float> } @sincos_zero_vector() { 
next:45'0                                                                X error: no match found
          25:  ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> splat (float 1.000000e+00) } 
next:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:45'1      ?                                                                                                         possible intended match
Step 7 (check) failure: check (failure)
...
[1350/1353] Building CXX object unittests/Transforms/Scalar/CMakeFiles/ScalarTests.dir/LoopPassManagerTest.cpp.o
clang++: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]
[1351/1353] Linking CXX executable unittests/Transforms/Scalar/ScalarTests
[1352/1353] Running the LLVM regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/wasm-ld
-- Testing: 57233 tests, 60 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.
FAIL: LLVM :: Transforms/InstSimplify/sincos.ll (44499 of 57233)
******************** TEST 'LLVM :: Transforms/InstSimplify/sincos.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/opt -S -passes=instsimplify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll | /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/opt -S -passes=instsimplify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-ufl3gadc/bin/FileCheck /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll:45:15: error: CHECK-NEXT: expected string not found in input
; CHECK-NEXT: ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> <float 1.000000e+00, float 1.000000e+00> }
              ^
<stdin>:24:60: note: scanning from here
define { <2 x float>, <2 x float> } @sincos_zero_vector() {
                                                           ^
<stdin>:25:2: note: possible intended match here
 ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> splat (float 1.000000e+00) }
 ^

Input file: <stdin>
Check file: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/test/Transforms/InstSimplify/sincos.ll

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
          19:  
          20: define { <2 x float>, <2 x float> } @sincos_vector() { 
          21:  ret { <2 x float>, <2 x float> } { <2 x float> <float 0x3FEAED5480000000, float 0x3FED18F6E0000000>, <2 x float> <float 0x3FE14A2800000000, float 0xBFDAA22660000000> } 
          22: } 
          23:  
          24: define { <2 x float>, <2 x float> } @sincos_zero_vector() { 
next:45'0                                                                X error: no match found
          25:  ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> splat (float 1.000000e+00) } 
next:45'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:45'1      ?                                                                                                         possible intended match

```

</details>

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


More information about the llvm-commits mailing list