Chen Zheng
066d3ffc05
[PowerPC] fold a bug for rlwinm folding when with full mask.
...
Reviewed By: steven.zhang
Differential Revision: https://reviews.llvm.org/D81006
2020-06-14 21:27:01 -04:00
Simon Pilgrim
2a0263bc9a
[PowerPC] Fix fold-rlwinm.mir typos in checks to fix issue reported on D77354
2020-04-08 17:42:07 +01:00
Zheng Chen
ceea5f24bd
[PowerPC] when folding rlwinm+rlwinm. to andi., we should use first rlwinm
...
input reg.
%2:gprc = RLWINM %1:gprc, 27, 5, 10
%3:gprc = RLWINM_rec %2:gprc, 8, 5, 10, implicit-def $cr0
==>
%3:gprc = ANDI_rec %1, 0, implicit-def $cr0
we should use %1 instead of %2 as ANDI_rec input.
Reviewed By: steven.zhang
Differential Revision: https://reviews.llvm.org/D71885
2020-01-08 20:59:08 -05:00
Jinsong Ji
687a7c63f2
[PowerPC][NFC] Rename record instructions to use _rec suffix instead of o
...
We use o suffix to indicate record form instuctions,
(as it is similar to dot '.' in mne?)
This was fine before, as we did not support XO-form.
However, with https://reviews.llvm.org/D66902 ,
we now have XO-form support.
It becomes confusing now to still use 'o' for record form,
and it is weird to have something like 'Oo' .
This patch rename all 'o' instructions to use '_rec' instead.
Also rename `isDot` to `isRecordForm`.
Reviewed By: #powerpc, hfinkel, nemanjai, steven.zhang, lkail
Differential Revision: https://reviews.llvm.org/D70758
2020-01-06 22:27:07 +00:00
czhengsz
4e05af94f0
[PowerPC] stop folding if result rlwinm mask is wrap while original rlwinm is not.
...
%1:g8rc = RLWINM8 %0:g8rc, 0, 16, 9
%2:g8rc = RLWINM8 killed %1:g8rc, 0, 0, 31
->
%2:g8rc = RLWINM8 %0:g8rc, 0, 16, 9
The above folding is wrong. Before transformation, %2:g8rc is 32 bit value. After
transformation, %2:g8rc becomes a 64 bit value.
This patch fixes above issue.
Reviewed by: steven.zhang
Differential Revision: https://reviews.llvm.org/D71833
2019-12-25 21:56:18 -05:00
czhengsz
8832763935
[PowerPC] NFC - fix the testcase bug of folding rlwinm
2019-12-23 10:28:22 -05:00
czhengsz
f0adb8a850
[PowerPC] folding rlwinm + rlwinm to rlwinm
...
For example:
x3 = rlwinm x3, 27, 5, 31
x3 = rlwinm x3, 19, 0, 12
can be combined to
x3 = rlwinm x3, 14, 0, 12
Reviewed by: steven.zhang, lkail
Differential Revision: https://reviews.llvm.org/D70374
2019-12-03 21:51:19 -05:00
czhengsz
34a5aa07c3
Revert "[PowerPC] combine rlwinm+rlwinm to rlwinm"
...
This reverts commit 29f6f9b2b2bfecccf903738e2f5a0cd0a70fce31.
2019-11-24 22:46:26 -05:00
czhengsz
0ce2ab6b1d
[PowerPC] combine rlwinm+rlwinm to rlwinm
...
combine
x3 = rlwinm x3, 27, 5, 31
x3 = rlwinm x3, 19, 0, 12
to
x3 = rlwinm x3, 14, 0, 12
Reviewed by: steven.zhang
Differential Revision: https://reviews.llvm.org/D70374
2019-11-22 00:00:33 -05:00