]> granicus.if.org Git - llvm/commit
[SystemZ] Bugfix in isFusableLoadOpStorePattern()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 4 Apr 2019 12:12:35 +0000 (12:12 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Thu, 4 Apr 2019 12:12:35 +0000 (12:12 +0000)
commit8d88d919bb8e4f727505a804e07a5334b330a5a0
tree87df8c657ea8bcd5db739f7457df12828d9c0290
parentb99bb13bdf853ac697e1b9d286314f4df8d821f7
[SystemZ]  Bugfix in isFusableLoadOpStorePattern()

This function is responsible for checking the legality of fusing an instance
of load -> op -> store into a single operation. In the SystemZ backend the
check was incomplete and a test case emerged with a cycle in the instruction
selection DAG as a result.

Instead of using the NodeIds to determine node relationships,
hasPredecessorHelper() now is used just like in the X86 backend. This handled
the failing tests and as well gave a few additional transformations on
benchmarks.

The SystemZ isFusableLoadOpStorePattern() is now a very near copy of the X86
function, and it seems this could be made a utility function in common code
instead.

Review: Ulrich Weigand
https://reviews.llvm.org/D60255

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357688 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
test/CodeGen/SystemZ/int-uadd-12.ll [new file with mode: 0644]