[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. In D146164#4200414 , @rsmith wrote: > FYI: this attribute appears to not work on (at least) x86 and arm currently, > because the backend also does some merging: https://godbolt.org/z/d43M83oax Thanks for reporting it. I'll

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. FYI: this attribute appears to not work on (at least) x86 and arm currently, because the backend also does some merging: https://godbolt.org/z/d43M83oax Comment at: clang/lib/CodeGen/CGExpr.cpp:3626-3627 } - + if (InNoMergeAttributedStmt) +

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/test/CodeGen/attr-nomerge.cpp:44 + + [[clang::nomerge]] __builtin_trap(); } hans wrote: > Maybe do __debugbreak() too since that's also mentioned on the debug. The `__debugbreak()` is also emitted from

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 505837. zequanwu marked 3 inline comments as done. zequanwu added a comment. - Add test case for __debugbreak(). - Handle named trap instructions and add test case for it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-16 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Since we're touching SelectionDAG, does GlobalISel also need updating? Comment at: clang/test/CodeGen/attr-nomerge.cpp:44 + + [[clang::nomerge]] __builtin_trap(); } Maybe do __debugbreak() too since that's also mentioned on the debug.

[PATCH] D146164: Fix nomerge attribute not working with __builtin_trap().

2023-03-15 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: hans, craig.topper. Herald added subscribers: pengfei, hiraditya. Herald added a project: All. zequanwu requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. 1. It fixes