[GVN] Intersect the IR flags when CSE'ing two instructions
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 24 Jun 2015 21:52:25 +0000 (21:52 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 24 Jun 2015 21:52:25 +0000 (21:52 +0000)
commit12bb40b2ab9d66faa53bf83c07edfc00fea3a1d3
tree2543963f2fd726d4a70118585652a29d0e4fb536
parente40e8487679ec36b4f3c25e7a9aab18977ca000d
[GVN] Intersect the IR flags when CSE'ing two instructions

We performed a simple, but incomplete, intersection when it came time to
CSE instructions.  It didn't handle, for example, the 'exact' flag.

This fixes PR23922.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240595 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/GVN.cpp
test/Transforms/GVN/pr12979.ll