diff options
| author | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-03-19 14:14:10 +0000 |
|---|---|---|
| committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-03-19 14:14:10 +0000 |
| commit | 18f1998a00492bb70de37aaab4441ea9cea306f5 (patch) | |
| tree | 129b81185e416407127b988792168eb47c30b4aa /llvm/lib/Target | |
| parent | 335c70f55ed2101ef7e7411a33b6af7eb2a4384b (diff) | |
| download | bcm5719-llvm-18f1998a00492bb70de37aaab4441ea9cea306f5.tar.gz bcm5719-llvm-18f1998a00492bb70de37aaab4441ea9cea306f5.zip | |
TableGen: Explicitly test some cases of self-references and !cast errors
Summary:
These are cases of self-references that exist today in practice. Let's
add tests for them to avoid regressions.
The self-references in PPCInstrInfo.td can be expressed in a simpler
way. Allowing this type of self-reference while at the same time
consistently doing late-resolve even for self-references is problematic
because there are references to fields that aren't in any class. Since
there's no need for this type of self-reference anyway, let's just
remove it.
Change-Id: I914e0b3e1ae7adae33855fac409b536879bc3f62
Reviewers: arsenm, craig.topper, tra, MartinO
Subscribers: nemanjai, wdng, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D44474
llvm-svn: 327848
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.td | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index d51a0e508ce..4030ca4c17e 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -4695,10 +4695,10 @@ def DWMaskValues { def DWSwapInByte { dag Swap1 = (OR8 (AND8 (RLDICL $A, 63, 1), DWMaskValues.Lo1), (AND8 (RLDICR $A, 1, 62), DWMaskValues.Hi1)); - dag Swap2 = (OR8 (AND8 (RLDICL DWSwapInByte.Swap1, 62, 2), DWMaskValues.Lo2), - (AND8 (RLDICR DWSwapInByte.Swap1, 2, 61), DWMaskValues.Hi2)); - dag Swap4 = (OR8 (AND8 (RLDICL DWSwapInByte.Swap2, 60, 4), DWMaskValues.Lo4), - (AND8 (RLDICR DWSwapInByte.Swap2, 4, 59), DWMaskValues.Hi4)); + dag Swap2 = (OR8 (AND8 (RLDICL Swap1, 62, 2), DWMaskValues.Lo2), + (AND8 (RLDICR Swap1, 2, 61), DWMaskValues.Hi2)); + dag Swap4 = (OR8 (AND8 (RLDICL Swap2, 60, 4), DWMaskValues.Lo4), + (AND8 (RLDICR Swap2, 4, 59), DWMaskValues.Hi4)); } // Intra-byte swap is done, now start inter-byte swap. @@ -4718,7 +4718,7 @@ def DWBytes7656 { def DWBytes7654 { dag Word = (RLWIMI DWBytes7656.Word, DWBytes4567.Word, 8, 24, 31); dag DWord = - (i64 (INSERT_SUBREG (i64 (IMPLICIT_DEF)), DWBytes7654.Word, sub_32)); + (i64 (INSERT_SUBREG (i64 (IMPLICIT_DEF)), Word, sub_32)); } def DWBytes0123 { @@ -4737,7 +4737,7 @@ def DWBytes3212 { def DWBytes3210 { dag Word = (RLWIMI DWBytes3212.Word, DWBytes0123.Word, 8, 24, 31); dag DWord = - (i64 (INSERT_SUBREG (i64 (IMPLICIT_DEF)), DWBytes3210.Word, sub_32)); + (i64 (INSERT_SUBREG (i64 (IMPLICIT_DEF)), Word, sub_32)); } // Now both high word and low word are reversed, next |

