diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-01-08 23:22:18 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-01-08 23:22:18 +0000 |
| commit | 0ad1b71fe37af3f3230b40e03e3a511c78152bad (patch) | |
| tree | 88cd385d6590db87b131b306eedacdf5fd3db840 /llvm/lib/CodeGen | |
| parent | d186dbc0414b6686f1d7a64c45da6c05c66aab42 (diff) | |
| download | bcm5719-llvm-0ad1b71fe37af3f3230b40e03e3a511c78152bad.tar.gz bcm5719-llvm-0ad1b71fe37af3f3230b40e03e3a511c78152bad.zip | |
RegisterCoalescer: Assume CR_Replace for SubRangeJoin
Currently it's possible for following
check on V.WriteLanes (which is not really meaningful
during SubRangeJoin) to pass for one half of the pair,
and then fall through to to one of the impossible
or unresolved states. This then fails as inconsistent
on the other half.
During the main range join, the check between V.WriteLanes
and OtherV.ValidLanes must have passed, meaning this
should be a CR_Replace.
Fixes most of the testcases in bugs 39542 and 39602
llvm-svn: 350678
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 9a689e9a17c..2cef900d8b7 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -2627,6 +2627,12 @@ JoinVals::analyzeValue(unsigned ValNo, JoinVals &Other) { return CR_Erase; } + // The remaining checks apply to the lanes, which aren't tracked here. This + // was already decided to be OK via the following CR_Replace condition. + // CR_Replace. + if (SubRangeJoin) + return CR_Replace; + // If the lanes written by this instruction were all undef in OtherVNI, it is // still safe to join the live ranges. This can't be done with a simple value // mapping, though - OtherVNI will map to multiple values: |

