[DAG] Expose NoSignedWrap, NoUnsignedWrap and Exact flags to SelectionDAG.
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 9 Jun 2014 12:32:53 +0000 (12:32 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Mon, 9 Jun 2014 12:32:53 +0000 (12:32 +0000)
commitbc72c8f0d8dbab5e1ce748cc390254a06e9a5c0a
tree81bf525a15db395c1e6d19c294fa4dc4c4a21960
parenta2bc6951a028412e7af5e68aa369daa4611147b3
[DAG] Expose NoSignedWrap, NoUnsignedWrap and Exact flags to SelectionDAG.

This patch modifies SelectionDAGBuilder to construct SDNodes with associated
NoSignedWrap, NoUnsignedWrap and Exact flags coming from IR BinaryOperator
instructions.

Added a new SDNode type called 'BinaryWithFlagsSDNode' to allow accessing
nsw/nuw/exact flags during codegen.

Patch by Marcello Maggioni.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210467 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
test/CodeGen/X86/2014-05-30-CombineAddNSW.ll [new file with mode: 0644]