[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 03:21:25 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `llvm` at step 6 "test-build-unified-tree-check-all".

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

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: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/opt < /b/1/llvm-clang-x86_64-expensive-checks-debian/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 | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll -check-prefixes=CHECK,NOBMI
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/opt -mtriple=x86_64-unknown-linux-gnu '-passes=print<cost-model>' -disable-output -cost-kind=size-latency -mattr=-bmi,+sse2
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/Analysis/CostModel/X86/cttz-sizelatency.ll -check-prefixes=CHECK,NOBMI
/b/1/llvm-clang-x86_64-expensive-checks-debian/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: /b/1/llvm-clang-x86_64-expensive-checks-debian/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': 
           2: Cost Model: Found an estimated cost of 2 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 false) 
           3: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %cttz 
           4: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i64u': 
           5: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i64 @llvm.cttz.i64(i64 %a, i1 true) 
           6: Cost Model: Found an estimated cost of 1 for instruction: ret i64 %cttz 
           7: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i32': 
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': 
next:43'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          11: Cost Model: Found an estimated cost of 1 for instruction: %cttz = call i32 @llvm.cttz.i32(i32 %a, i1 true) 
          12: Cost Model: Found an estimated cost of 1 for instruction: ret i32 %cttz 
          13: Printing analysis 'Cost Model Analysis' for function 'var_cttz_i16': 
           .
           .
           .
>>>>>>

--

...

```

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


More information about the llvm-commits mailing list