- generate rldicr (clrrdi) for AND with an immediate like 0xFFFFFFFFFFFF0000 (i.e. a bit sequence of ones from most significant side and all zero for reminder) on PowerPC platform; currently LLVM generates two or three instructions
- update two unit tests affected by this change
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Please upload the patch with full context (see http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface).
test/CodeGen/PowerPC/i64_fp_round.ll | ||
---|---|---|
23 ↗ | (On Diff #86629) | Why did this change? Is it because there are more/fewer instructions emitted for this test case that are not tested for? If this is the case, I think it makes more sense to use FileCheck variables for these registers rather than hard-coding them. |
Thank you for the comment.
I updated i64_fp_round.ll not to use the hard-coded register number.
This patch reduces one instruction in i64_fp_round.ll and affects the register assignment.
li 4, -2048 and 4, 5, 4
into
rldicr 5, 5, 0, 52
Please add a test that intentionally triggers this transformation (i.e. the test case that motivated the patch). It doesn't necessarily have to be in a separate test case - you can just add a function to an existing test case that does this. I don't think this requires another review - you can address these on the commit.
lib/Target/PowerPC/PPCISelDAGToDAG.cpp | ||
---|---|---|
2717 ↗ | (On Diff #88487) | Nit: please always make comments full sentences. |
- I updated the comment
- I added an explicit test case in test/CodeGen/PowerPC/srl-mask.ll