aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorSerguei Katkov <serguei.katkov@azul.com>2017-12-27 08:26:22 +0000
committerSerguei Katkov <serguei.katkov@azul.com>2017-12-27 08:26:22 +0000
commitda56a7f3884772f84c1127798548870cc1c46c1b (patch)
tree3a96c6f741283e78e7c306d752e4d6605c756da2 /llvm/lib/Support/CommandLine.cpp
parenta1e5f0c3396b64055e01287bfb1aff18ef4e6f92 (diff)
downloadllvm-da56a7f3884772f84c1127798548870cc1c46c1b.zip
llvm-da56a7f3884772f84c1127798548870cc1c46c1b.tar.gz
llvm-da56a7f3884772f84c1127798548870cc1c46c1b.tar.bz2
[SCEV] Be careful with nuw/nsw/exact in InsertBinop
InsertBinop tries to find an appropriate instruction instead of creating a new instruction. When it checks whether instruction is the same as we need to create it ignores nuw/nsw/exact flags. It leads to invalid behavior when poison instruction can be used when it was not expected. Specifically, for example Expander expands the SCEV built for instruction %a = add i32 %v, 1 It is possible that InsertBinop can find an instruction % b = add nuw nsw i32 %v, 1 and will use it instead of version w/o nuw nsw. It is incorrect. The patch conservatively ignores all instructions with any of poison flags installed. Reviewers: sanjoy, mkazantsev, sebpop, jbhateja Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41576 llvm-svn: 321475
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions