summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/and-mask.ll
Commit message (Collapse)AuthorAgeFilesLines
* [PowerPC] Exploit the rlwinm instructions for "and" with constantQingShan Zhang2019-12-301-4/+1
| | | | | | | | | | | | | | | | | | | | For now, PowerPC will using several instructions to get the constant and "and" it with the following case: define i32 @test1(i32 %a) { %and = and i32 %a, -2 ret i32 %and } However, we could exploit it with the rotate mask instructions. MB ME +----------------------+ |xxxxxxxxxxx00011111000| +----------------------+ 0 32 64 Notice that, we can only do it if the MB is larger than 32 and MB <= ME as RLWINM will replace the content of [0 - 32) with [32 - 64) even we didn't rotate it. Differential Revision: https://reviews.llvm.org/D71829
* [NFC][Test][PowerPC] Add more tests for 'and mask'QingShan Zhang2019-12-231-0/+91
OpenPOWER on IntegriCloud