[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355054: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow (authored by epilk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58744/new/ https://reviews.llvm.org/D58744 ___ cfe-commits mailing list

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 188645. erik.pilkington added a comment. Use `atomicPHI->getParent()` instead of tracking the block. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58744/new/ https://reviews.llvm.org/D58744 Files: clang/lib/CodeGen/CGExprScalar.cpp

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington marked an inline comment as done. erik.pilkington added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2921 +atomicPHI->addIncoming(old, curBlock); +Builder.CreateCondBr(success, contBB, atomicOpBB); Builder.SetInsertPoint(contBB);

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/test/CodeGen/sanitize-atomic-int-overflow.c:3 + +_Atomic(unsigned) atomic; + ahatanak wrote: > It's probably better to add some check strings here. I see this has been fixed in the updated patch. CHANGES SINCE

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:2921 +atomicPHI->addIncoming(old, curBlock); +Builder.CreateCondBr(success, contBB, atomicOpBB); Builder.SetInsertPoint(contBB); Would passing `atomicPHI->getParent()`

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington updated this revision to Diff 188641. erik.pilkington added a comment. Use FileCheck in the test, NFC. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58744/new/ https://reviews.llvm.org/D58744 Files: clang/lib/CodeGen/CGExprScalar.cpp

[PATCH] D58744: [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflow

2019-02-27 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rjmccall, arphaman, ahatanak. Herald added subscribers: jdoerfert, jfb, dexonsmith, jkorous. Herald added a project: clang. I think the author of the function assumed that `GetInsertBlock()` wouldn't change from where