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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 00:07:20 PST 2017


jonpa created this revision.

When the new zero-extending load is created, the (chain) users of the original load must be updated, which was not done previously.

      

Csmith discovered a program where a following store to the same address did not get chained after the new load, and so performed an illegal overwrite of the expected value.

To me, it seems necessary to update all users with both the loaded value and chain. This is not done automatically, since the load is an operand of the node returned.

I have found one other similar case which I suspect should also be fixed (?): lowerBITCAST().


https://reviews.llvm.org/D40542

Files:
  lib/Target/SystemZ/SystemZISelLowering.cpp
  test/CodeGen/SystemZ/dag-combine-02.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40542.124521.patch
Type: text/x-patch
Size: 10387 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171128/7c3c5483/attachment.bin>


More information about the llvm-commits mailing list