[llvm] [TargetLowering] Change SSUBO to do (LHS < RHS) XOR (RESULT < 0) (PR #191672)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 11 17:17:41 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 133339 tests passed
* 3083 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.CodeGen/AMDGPU/GlobalISel/legalize-ssubo.mir</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer -o - C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -O0 -run-pass=legalizer -o - 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:22:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP1]], [[ICMP]]
# | ^
# | <stdin>:189:48: note: scanning from here
# | %11:_(s1) = G_ICMP intpred(slt), %14(s32), %20
# | ^
# | <stdin>:189:48: note: with "ICMP1" equal to "%11"
# | %11:_(s1) = G_ICMP intpred(slt), %14(s32), %20
# | ^
# | <stdin>:189:48: note: with "ICMP" equal to "%10"
# | %11:_(s1) = G_ICMP intpred(slt), %14(s32), %20
# | ^
# | <stdin>:190:2: note: possible intended match here
# | %5:_(s1) = G_XOR %10, %11
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:57:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP1]], [[ICMP]]
# | ^
# | <stdin>:331:48: note: scanning from here
# | %11:_(s1) = G_ICMP intpred(slt), %12(s32), %13
# | ^
# | <stdin>:331:48: note: with "ICMP1" equal to "%11"
# | %11:_(s1) = G_ICMP intpred(slt), %12(s32), %13
# | ^
# | <stdin>:331:48: note: with "ICMP" equal to "%10"
# | %11:_(s1) = G_ICMP intpred(slt), %12(s32), %13
# | ^
# | <stdin>:332:2: note: possible intended match here
# | %5:_(s1) = G_XOR %10, %11
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:87:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP1]], [[ICMP]]
# | ^
# | <stdin>:458:45: note: scanning from here
# | %8:_(s1) = G_ICMP intpred(slt), %5(s32), %6
# | ^
# | <stdin>:458:45: note: with "ICMP1" equal to "%8"
# | %8:_(s1) = G_ICMP intpred(slt), %5(s32), %6
# | ^
# | <stdin>:458:45: note: with "ICMP" equal to "%7"
# | %8:_(s1) = G_ICMP intpred(slt), %5(s32), %6
# | ^
# | <stdin>:459:2: note: possible intended match here
# | %3:_(s1) = G_XOR %7, %8
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:119:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP1]], [[ICMP]]
# | ^
# | <stdin>:598:45: note: scanning from here
# | %8:_(s1) = G_ICMP intpred(slt), %5(s64), %6
# | ^
# | <stdin>:598:45: note: with "ICMP1" equal to "%8"
# | %8:_(s1) = G_ICMP intpred(slt), %5(s64), %6
# | ^
# | <stdin>:598:45: note: with "ICMP" equal to "%7"
# | %8:_(s1) = G_ICMP intpred(slt), %5(s64), %6
# | ^
# | <stdin>:599:2: note: possible intended match here
# | %3:_(s1) = G_XOR %7, %8
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:172:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP2]], [[ICMP]]
# | ^
# | <stdin>:812:48: note: scanning from here
# | %21:_(s1) = G_ICMP intpred(slt), %22(s32), %23
# | ^
# | <stdin>:812:48: note: with "ICMP2" equal to "%20"
# | %21:_(s1) = G_ICMP intpred(slt), %22(s32), %23
# | ^
# | <stdin>:812:48: note: with "ICMP" equal to "%30"
# | %21:_(s1) = G_ICMP intpred(slt), %22(s32), %23
# | ^
# | <stdin>:813:2: note: possible intended match here
# | %14:_(s1) = G_XOR %30, %20
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:239:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP3]], [[ICMP]]
# | ^
# | <stdin>:1136:48: note: scanning from here
# | %38:_(s1) = G_ICMP intpred(slt), %39(s32), %40
# | ^
# | <stdin>:1136:48: note: with "ICMP3" equal to "%36"
# | %38:_(s1) = G_ICMP intpred(slt), %39(s32), %40
# | ^
# | <stdin>:1136:48: note: with "ICMP" equal to "%51"
# | %38:_(s1) = G_ICMP intpred(slt), %39(s32), %40
# | ^
# | <stdin>:1139:2: note: possible intended match here
# | %29:_(s1) = G_XOR %53, %38
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:350:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP4]], [[ICMP]]
# | ^
# | <stdin>:1470:48: note: scanning from here
# | %33:_(s1) = G_ICMP intpred(slt), %34(s32), %35
# | ^
# | <stdin>:1470:48: note: with "ICMP4" equal to "%30"
# | %33:_(s1) = G_ICMP intpred(slt), %34(s32), %35
# | ^
# | <stdin>:1470:48: note: with "ICMP" equal to "%50"
# | %33:_(s1) = G_ICMP intpred(slt), %34(s32), %35
# | ^
# | <stdin>:1472:2: note: possible intended match here
# | %19:_(s1) = G_XOR %51, %31
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir:398:16: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s1) = G_XOR [[ICMP2]], [[ICMP]]
# | ^
# | <stdin>:1651:47: note: scanning from here
# | %21:_(s1) = G_ICMP intpred(slt), %33(s32), %6
# | ^
# | <stdin>:1651:47: note: with "ICMP2" equal to "%20"
# | %21:_(s1) = G_ICMP intpred(slt), %33(s32), %6
# | ^
# | <stdin>:1651:47: note: with "ICMP" equal to "%26"
# | %21:_(s1) = G_ICMP intpred(slt), %33(s32), %6
# | ^
# | <stdin>:1652:2: note: possible intended match here
# | %14:_(s1) = G_XOR %26, %20
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\AMDGPU\GlobalISel\legalize-ssubo.mir
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 184: %20:_(s32) = G_CONSTANT i32 0
# | 185: %18:_(s32) = G_SEXT_INREG %0, 7
# | 186: %19:_(s32) = G_SEXT_INREG %1, 7
# | 187: %10:_(s1) = G_ICMP intpred(slt), %18(s32), %19
# | 188: %14:_(s32) = G_SEXT_INREG %23, 7
# | 189: %11:_(s1) = G_ICMP intpred(slt), %14(s32), %20
# | next:22'0 X error: no match found
# | next:22'1 with "ICMP1" equal to "%11"
# | next:22'2 with "ICMP" equal to "%10"
# | 190: %5:_(s1) = G_XOR %10, %11
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:22'3 ? possible intended match
# | 191: %24:_(s32) = G_CONSTANT i32 127
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 192: %6:_(s32) = G_AND %23, %24
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 193: %7:_(s32) = G_ZEXT %5(s1)
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 194: $vgpr0 = COPY %6(s32)
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 195: $vgpr1 = COPY %7(s32)
# | next:22'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 326: %14:_(s32) = G_SEXT_INREG %0, 16
# | 327: %15:_(s32) = G_SEXT_INREG %1, 16
# | 328: %10:_(s1) = G_ICMP intpred(slt), %14(s32), %15
# | 329: %12:_(s32) = G_SEXT_INREG %18, 16
# | 330: %13:_(s32) = G_CONSTANT i32 0
# | 331: %11:_(s1) = G_ICMP intpred(slt), %12(s32), %13
# | next:57'0 X error: no match found
# | next:57'1 with "ICMP1" equal to "%11"
# | next:57'2 with "ICMP" equal to "%10"
# | 332: %5:_(s1) = G_XOR %10, %11
# | next:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:57'3 ? possible intended match
# | 333: %7:_(s32) = G_ZEXT %5(s1)
# | next:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 334: $vgpr0 = COPY %18(s32)
# | next:57'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 335: $vgpr1 = COPY %7(s32)
# | next:57'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 336: ...
# | next:57'0 ~~~~
# | 337: ---
# | next:57'0 ~~~~
# | .
# | .
# | .
# | 453: %0:_(s32) = COPY $vgpr0
# | 454: %1:_(s32) = COPY $vgpr1
# | 455: %5:_(s32) = G_SUB %0, %1
# | 456: %6:_(s32) = G_CONSTANT i32 0
# | 457: %7:_(s1) = G_ICMP intpred(slt), %0(s32), %1
# | 458: %8:_(s1) = G_ICMP intpred(slt), %5(s32), %6
# | next:87'0 X error: no match found
# | next:87'1 with "ICMP1" equal to "%8"
# | next:87'2 with "ICMP" equal to "%7"
# | 459: %3:_(s1) = G_XOR %7, %8
# | next:87'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:87'3 ? possible intended match
# | 460: %2:_(s32) = COPY %5(s32)
# | next:87'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 461: %4:_(s32) = G_ZEXT %3(s1)
# | next:87'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 462: $vgpr0 = COPY %2(s32)
# | next:87'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 463: $vgpr1 = COPY %4(s32)
# | next:87'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 464: ...
# | next:87'0 ~~~~
# | .
# | .
# | .
# | 593: %13:_(s32), %14:_(s1) = G_USUBO %9, %11
# | 594: %15:_(s32), %16:_(s1) = G_USUBE %10, %12, %14
# | 595: %5:_(s64) = G_MERGE_VALUES %13(s32), %15(s32)
# | 596: %6:_(s64) = G_CONSTANT i64 0
# | 597: %7:_(s1) = G_ICMP intpred(slt), %0(s64), %1
# | 598: %8:_(s1) = G_ICMP intpred(slt), %5(s64), %6
# | next:119'0 X error: no match found
# | next:119'1 with "ICMP1" equal to "%8"
# | next:119'2 with "ICMP" equal to "%7"
# | 599: %3:_(s1) = G_XOR %7, %8
# | next:119'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:119'3 ? possible intended match
# | 600: %2:_(s64) = COPY %5(s64)
# | next:119'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 601: %4:_(s32) = G_ZEXT %3(s1)
# | next:119'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 602: $vgpr0_vgpr1 = COPY %2(s64)
# | next:119'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 603: $vgpr2 = COPY %4(s32)
# | next:119'0 ~~~~~~~~~~~~~~~~~~~~~~~
# | 604: ...
# | next:119'0 ~~~~
# | .
# | .
# | .
# | 807: %24:_(s32) = G_SEXT_INREG %47, 16
# | 808: %23:_(s32) = G_CONSTANT i32 0
# | 809: %25:_(s32) = COPY %23(s32)
# | 810: %20:_(s1) = G_ICMP intpred(slt), %24(s32), %25
# | 811: %22:_(s32) = G_SEXT_INREG %44, 16
# | 812: %21:_(s1) = G_ICMP intpred(slt), %22(s32), %23
# | next:172'0 X error: no match found
# | next:172'1 with "ICMP2" equal to "%20"
# | next:172'2 with "ICMP" equal to "%30"
# | 813: %14:_(s1) = G_XOR %30, %20
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:172'3 ? possible intended match
# | 814: %15:_(s1) = G_XOR %31, %21
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 815: %52:_(s32) = G_ANYEXT %14(s1)
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 816: %53:_(s32) = G_ANYEXT %15(s1)
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 817: %2:_(<2 x s16>) = COPY %5(<2 x s16>)
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 818: %65:_(s32) = G_CONSTANT i32 1
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 1131: %36:_(s1) = G_ICMP intpred(slt), %43(s32), %44
# | 1132: %41:_(s32) = G_SEXT_INREG %74, 16
# | 1133: %42:_(s32) = COPY %40(s32)
# | 1134: %37:_(s1) = G_ICMP intpred(slt), %41(s32), %42
# | 1135: %39:_(s32) = G_SEXT_INREG %71, 16
# | 1136: %38:_(s1) = G_ICMP intpred(slt), %39(s32), %40
# | next:239'0 X error: no match found
# | next:239'1 with "ICMP3" equal to "%36"
# | next:239'2 with "ICMP" equal to "%51"
# | 1137: %27:_(s1) = G_XOR %51, %36
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1138: %28:_(s1) = G_XOR %52, %37
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1139: %29:_(s1) = G_XOR %53, %38
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:239'3 ? possible intended match
# | 1140: %118:_(s32) = G_ANYEXT %27(s1)
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1141: %119:_(s32) = G_ANYEXT %28(s1)
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1142: %120:_(s32) = G_ANYEXT %29(s1)
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1143: %164:_(s32) = G_CONSTANT i32 65535
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1144: %155:_(s32) = G_AND %77, %164
# | next:239'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 1465: %31:_(s1) = G_ICMP intpred(slt), %38(s32), %39
# | 1466: %36:_(s32) = G_SEXT_INREG %79, 16
# | 1467: %37:_(s32) = COPY %35(s32)
# | 1468: %32:_(s1) = G_ICMP intpred(slt), %36(s32), %37
# | 1469: %34:_(s32) = G_SEXT_INREG %76, 16
# | 1470: %33:_(s1) = G_ICMP intpred(slt), %34(s32), %35
# | next:350'0 X error: no match found
# | next:350'1 with "ICMP4" equal to "%30"
# | next:350'2 with "ICMP" equal to "%50"
# | 1471: %18:_(s1) = G_XOR %50, %30
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1472: %19:_(s1) = G_XOR %51, %31
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:350'3 ? possible intended match
# | 1473: %20:_(s1) = G_XOR %52, %32
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1474: %21:_(s1) = G_XOR %53, %33
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1475: %94:_(s32) = G_ANYEXT %18(s1)
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1476: %95:_(s32) = G_ANYEXT %19(s1)
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1477: %96:_(s32) = G_ANYEXT %20(s1)
# | next:350'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 1646: %22:_(s32), %23:_(s32) = G_UNMERGE_VALUES %0(<2 x s32>)
# | 1647: %24:_(s32), %25:_(s32) = G_UNMERGE_VALUES %1(<2 x s32>)
# | 1648: %26:_(s1) = G_ICMP intpred(slt), %22(s32), %24
# | 1649: %27:_(s1) = G_ICMP intpred(slt), %23(s32), %25
# | 1650: %20:_(s1) = G_ICMP intpred(slt), %32(s32), %6
# | 1651: %21:_(s1) = G_ICMP intpred(slt), %33(s32), %6
# | next:398'0 X error: no match found
# | next:398'1 with "ICMP2" equal to "%20"
# | next:398'2 with "ICMP" equal to "%26"
# | 1652: %14:_(s1) = G_XOR %26, %20
# | next:398'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:398'3 ? possible intended match
# | 1653: %15:_(s1) = G_XOR %27, %21
# | next:398'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1654: %38:_(s32) = G_ANYEXT %14(s1)
# | next:398'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1655: %39:_(s32) = G_ANYEXT %15(s1)
# | next:398'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1656: %2:_(<2 x s32>) = COPY %5(<2 x s32>)
# | next:398'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 1657: %41:_(s32) = G_CONSTANT i32 1
# | next:398'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/191672
More information about the llvm-commits
mailing list