Baseline tests for https://reviews.llvm.org/D133362
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Transforms/InstCombine/add_or_sub.ll | ||
---|---|---|
11 | This isn't the pattern you intended - notice the 'or' operands were commuted. For this test only, we don't want any extra 'thwart' instruction. | |
32–33 | This is a fun example. In order, for x to be op0 of the 'add', it must be a binop or other instruction with high complexity. But for x to be op1 of the 'or', it must be equal or lower complexity than a negate - which is treated as a special-case (lower complexity than a binop). Therefore, the intended pattern is impossible given the current weights. Let's just leave this test as-is in case the weightings ever change. |
llvm/test/Transforms/InstCombine/add_or_sub.ll | ||
---|---|---|
89 | Replace undef with poison. We're moving away from undef as a value in IR, so we don't want to add new tests with undef. |
llvm/test/Transforms/InstCombine/add_or_sub.ll | ||
---|---|---|
93 | This looks good, but there should be 3 of these multi-use tests:
The general rule for instcombine transforms is that we don't want to end up with more instructions than we started with, so it can get a bit tricky, but we'll sort that out in the code patch. |
llvm/test/Transforms/InstCombine/add_or_sub.ll | ||
---|---|---|
93 | Done 👍 |
LGTM - the tests are often harder to get right than the code. :)
If you don't have commit access, please post name+email to receive the proper author citation.
Thanks!
I do not have commit access, so here is my data:
Name: Marc Auberer
Username: marcauberer
Email: contact@marc-auberer.com
This isn't the pattern you intended - notice the 'or' operands were commuted. For this test only, we don't want any extra 'thwart' instruction.