summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/SymbolicFile.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2017-06-06 08:28:17 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2017-06-06 08:28:17 +0000
commitb2781fb1865dc23fcbbf3aed0983bf79d3b6ad63 (patch)
tree4167d1412293c9825b74d11c8a7a73fe2ba46d01 /llvm/lib/Object/SymbolicFile.cpp
parent56d87ef5d7c3b3f53cafd2a360b949b39bc88733 (diff)
downloadbcm5719-llvm-b2781fb1865dc23fcbbf3aed0983bf79d3b6ad63.tar.gz
bcm5719-llvm-b2781fb1865dc23fcbbf3aed0983bf79d3b6ad63.zip
[docs] Make it clear shifts yield poison when shift amount >= bitwidth
Some InstCombine optimizations already rely on the result being poison rather than undef. For example, the following rewrite is wrong if undef is used: ; (1 << Y) * X -> X << Y %Op0 = shl 1, %Y %r = mul %Op0, %Op1 => %r = shl %Op1, %Y ERROR: Mismatch in values for i4 %r Example: i4 %Y = 0x8 (8, -8) i4 %Op0 = 0x0 (0) i4 %Op1 = 0x0 (0) source: 0x0 (0) target: 0x1 (1) The optimization is correct if poison is returned instead: http://rise4fun.com/Alive/ygX Differential Revision: https://reviews.llvm.org/D33654 llvm-svn: 304780
Diffstat (limited to 'llvm/lib/Object/SymbolicFile.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud