OSDN Git Service

[NFC][Codegen] Add better test coverage for potential add/sub constant folding
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 16:07:19 +0000 (16:07 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 30 May 2019 16:07:19 +0000 (16:07 +0000)
commit4599584ea3de9e7f115eb1723de7d3234a38cd6e
tree5d8561cc76202d6c3b3e2a095ea4b84c2a145c83
parented880bf1d6401b1c52175c827722327b7b228752
[NFC][Codegen] Add better test coverage for potential add/sub constant folding

This adds hopefully-full test coverage for all the possible permutations:
First op is one of:
* x + c1
* x - c1
* c1 - x

Second op is one of:
* + c2
* - c2
* c2 -

And thus 3*3=9 patterns.
Some of them show missed constant-folds.

Without previous patch (the revert), these tests were causing endless
dagcombine loop. I really should have thought about this first :S

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362110 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/AArch64/addsub-constant-folding.ll [new file with mode: 0644]
test/CodeGen/AArch64/vec_add.ll [deleted file]
test/CodeGen/X86/addsub-constant-folding.ll [new file with mode: 0644]
test/CodeGen/X86/vec_add.ll [deleted file]