[llvm] [RISCV] Prefer (select (x < 0), y, z) -> x >> (XLEN - 1) & (y - z) + z even with Zicond. (PR #125772)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 09:10:06 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ml-opt-rel-x86-64` running on `ml-opt-rel-x86-64-b2` while building `llvm` at step 6 "test-build-unified-tree-check-all".

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

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

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/RISCV/select-const.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=riscv32 -target-abi=ilp32 -verify-machineinstrs < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll    | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefixes=RV32,RV32I /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=riscv32 -target-abi=ilp32 -verify-machineinstrs
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefixes=RV32,RV32I /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll
RUN: at line 4: /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=riscv32 -mattr=+f -target-abi=ilp32 -verify-machineinstrs < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll    | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefixes=RV32,RV32IF /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefixes=RV32,RV32IF /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=riscv32 -mattr=+f -target-abi=ilp32 -verify-machineinstrs
RUN: at line 6: /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=riscv32 -mattr=+zicond -target-abi=ilp32 -verify-machineinstrs < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll    | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefixes=RV32,RV32ZICOND /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=riscv32 -mattr=+zicond -target-abi=ilp32 -verify-machineinstrs
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefixes=RV32,RV32ZICOND /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll:464:20: error: RV32ZICOND-NEXT: expected string not found in input
; RV32ZICOND-NEXT: slti a0, a0, 0
                   ^
<stdin>:237:9: note: scanning from here
# %bb.0:
        ^
<stdin>:238:2: note: possible intended match here
 srai a0, a0, 31
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll:513:20: error: RV32ZICOND-NEXT: expected string not found in input
; RV32ZICOND-NEXT: slti a0, a0, 0
                   ^
<stdin>:251:9: note: scanning from here
# %bb.0:
        ^
<stdin>:252:2: note: possible intended match here
 srai a0, a0, 31
 ^

Input file: <stdin>
Check file: /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/RISCV/select-const.ll

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

Input was:
<<<<<<
            .
            .
            .
          232:  .globl select_slt_zero_constant1_constant2 # -- Begin function select_slt_zero_constant1_constant2 
          233:  .p2align 2 
          234:  .type select_slt_zero_constant1_constant2, at function 
          235: select_slt_zero_constant1_constant2: # @select_slt_zero_constant1_constant2 
          236:  .cfi_startproc 
          237: # %bb.0: 
next:464'0             X error: no match found
...

```

</details>

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


More information about the llvm-commits mailing list