[llvm] [X86] Promote cttz_i32(x) -> cttz_i64((i64)x | (1 << 32)) (PR #102900)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 02:24:12 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `llvm` at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference:
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: Analysis/CostModel/X86/cttz-sizelatency.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt < /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll -mtriple=x86_64-unknown-linux-gnu -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=size-latency -mattr=-bmi,+sse2 | /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll -check-prefixes=CHECK,NOBMI
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/opt -mtriple=x86_64-unknown-linux-gnu '-passes=print<cost-model>' -disable-output -cost-kind=size-latency -mattr=-bmi,+sse2
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/FileCheck /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll -check-prefixes=CHECK,NOBMI
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll:43:15: error: NOBMI-NEXT: expected string not found in input
; NOBMI-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 false)
              ^
<stdin>:7:68: note: scanning from here
Printing analysis 'Cost Model Analysis' for function 'var_cttz_i32':
                                                                   ^
<stdin>:8:1: note: possible intended match here
Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 false)
^

Input file: <stdin>
Check file: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll

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

Input was:
<<<<<<
             1: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i64': 
label:20'0                                                           ^~~~~~~~~~~~~~
label:20'1                                                           ^~~~~~~~~~~~~~
             2: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 false) 
next:21         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             3: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %cttz 
next:22         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             4: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i64u': 
label:33'0                                                           ^~~~~~~~~~~~~~~
label:33'1                                                           ^~~~~~~~~~~~~~~
             5: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 true) 
next:34         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             6: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %cttz 
next:35         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             7: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i32': 
label:42'0                                                           ^~~~~~~~~~~~~~
label:42'1                                                           ^~~~~~~~~~~~~~
next:43'0                                                                          X~ error: no match found
             8: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 false) 
next:43'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
next:43'1       ?                                                                                                            possible intended match
             9: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %cttz 
next:43'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            10: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i32u': 
label:55                                                             ^~~~~~~~~~~~~~~
...

```

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


More information about the llvm-commits mailing list