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
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
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
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);
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
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()`
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
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