[llvm] [SelectionDAG] Add space-optimized forms of OPC_CheckPredicate (PR #77763)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 11:03:32 PST 2024


ilovepi wrote:

Oddly, I'm seeing a test failure locally in `TableGen/address-space-patfrags.td` that stops happening when I revert this patch? Any clues as to why we wouldn't see this on bots? There isn't anything non-standard in my CMake other than I've enabled `-DLLVM_REVERSE_ITERATION=On`. Well, that and assertions + the runtimes build, but this happens even if I just build and test llvm.

```
FAIL: LLVM :: TableGen/address-space-patfrags.td (36879 of 53624)
******************** TEST 'LLVM :: TableGen/address-space-patfrags.td' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /usr/local/google/home/paulkirth/llvm-fork/build/bin/llvm-tblgen -gen-dag-isel -I /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/../../include /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/address-space-patfrags.td 2>&1 | /usr/local/google/home/paulkirth/llvm-fork/build/bin/FileCheck -check-prefix=SDAG /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/address-space-patfrags.td
+ /usr/local/google/home/paulkirth/llvm-fork/build/bin/FileCheck -check-prefix=SDAG /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/address-space-patfrags.td
+ /usr/local/google/home/paulkirth/llvm-fork/build/bin/llvm-tblgen -gen-dag-isel -I /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/../../include /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/address-space-patfrags.td
/usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/address-space-patfrags.td:50:15: error: SDAG-NEXT: expected string not found in input
// SDAG-NEXT: // Predicate_pat_frag_b
              ^
<stdin>:183:11: note: scanning from here
 case 1: {
          ^
<stdin>:200:2: note: possible intended match here
 // Predicate_pat_frag_a
 ^

Input file: <stdin>
Check file: /usr/local/google/home/paulkirth/llvm-fork/llvm/test/TableGen/address-space-patfrags.td

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

Input was:
<<<<<<
           .
           .
           .
         178:  if (AddrSpace != 123 && AddrSpace != 455)
         179: return false;
         180: return true;
         181:
         182:  }
         183:  case 1: {
next:50'0               X error: no match found
         184:  // Predicate_truncstore
next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
         185:  SDNode *N = Node;
next:50'0     ~~~~~~~~~~~~~~~~~~~
         186:  (void)N;
next:50'0     ~~~~~~~~~~
         187:  if (!cast<StoreSDNode>(N)->isTruncatingStore()) return false;
next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         188: return true;
next:50'0     ~~~~~~~~~~~~~
           .
           .
           .
         195: if (cast<StoreSDNode>(N)->getAddressingMode() != ISD::UNINDEXED) return false;
next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         196: return true;
next:50'0     ~~~~~~~~~~~~~
         197:
next:50'0     ~
         198:  }
next:50'0     ~~~
         199:  case 3: {
next:50'0     ~~~~~~~~~~~
         200:  // Predicate_pat_frag_a
next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
next:50'1      ?                        possible intended match
         201:  SDNode *N = Node;
next:50'0     ~~~~~~~~~~~~~~~~~~~
         202:  (void)N;
next:50'0     ~~~~~~~~~~
         203: if (cast<MemSDNode>(N)->getAlign() < Align(2))
next:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         204: return false;
next:50'0     ~~~~~~~~~~~~~~
         205: return true;
next:50'0     ~~~~~~~~~~~~~
           .
           .
           .
>>>>>>

--

********************
********************
Failed Tests (1):
  LLVM :: TableGen/address-space-patfrags.td


Testing Time: 95.67s
```

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


More information about the llvm-commits mailing list