1. [SCCP] Add tests for intrinsic ranges (NFC) (details)
  2. [SelectionDAG] Always intersect SDNode flags during getNode() node memoization. (details)
Commit 39caf9e94091629c65038b90215e24eea47a5ce5 by nikita.ppv
[SCCP] Add tests for intrinsic ranges (NFC)
The file was addedllvm/test/Transforms/SCCP/intrinsics.ll
Commit 714ceefad9b96ab3ef20913f2110883a1ad34a13 by paulsson
[SelectionDAG] Always intersect SDNode flags during getNode() node memoization.

Previously SDNodeFlags::instersectWith(Flags) would do nothing if Flags was
in an undefined state, which is very bad given that this is the default when
getNode() is called without passing an explicit SDNodeFlags argument.

This meant that if an already existing and reused node had a flag which the
second caller to getNode() did not set, that flag would remain uncleared.

This was exposed by, where an NSW
flag was incorrectly set on an add instruction (which did in fact overflow in
one of the two original contexts), so when SystemZElimCompare removed the
compare with 0 trusting that flag, wrong-code resulted.

There is more that needs to be done in this area as discussed here:

Differential Revision:

Review: Ulrich Weigand, Sanjay Patel
The file was modifiedllvm/include/llvm/CodeGen/SelectionDAGNodes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
The file was addedllvm/test/CodeGen/SystemZ/int-cmp-60.ll
The file was addedllvm/test/CodeGen/SystemZ/fp-mul-14.ll