[PATCH] D40542: [SystemZ] Bugfix in adjustSubwordCmp()

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 12:11:56 PST 2017


uweigand requested changes to this revision.
uweigand added a comment.
This revision now requires changes to proceed.

Actually, I take it back, sorry ...

I think replacing the *value* of the load is wrong.  Note that the new load may actually use a different result type, which wouldn't match the original user of the value.  Now, normally, that user will get removed once we emit the new comparison.  But (at least in principle) it is possible to call getCmp without calling emitCmp afterwards.   And even if you do, the DAG would be somewhat inconsistent at least in the interim.

So I'm wondering if the right fix isn't to only replace the *chain* users?  Then you'd have in the interim simply two loads chained together, and later on one of them will be eliminated again (the original one if emitCmp is called, the new one if it isn't).


https://reviews.llvm.org/D40542





More information about the llvm-commits mailing list