[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-03 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 363746. pengfei added a comment. Implemented the handling for structure types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/lib/CodeGen/CGStmt.cpp

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-02 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. > First I did not say "code doesn't make much sense to me". This is copy form > your description. Oop, my bad understanding. :) > both gcc and icc generated code is not making sense to you. Yes. Unless there's document to specify the behavior clearly. > So instead, yo

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. First I did not say "code doesn't make much sense to me". This is copy form your description. Okay, thank for explanation. So if I understand right, both gcc and icc generated code is not making sense to you. So instead, you want clang give error for this when output

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-02 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. @jyu2, Thanks for the detailed information. > Besides, if we change "=rm" to "=r" > or "=m", GCC and ICC will report error differently. Which gives me an > impression that the use of constraint is undefined behavior. > To me it is defined behavior. Or I may missing some t

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-02 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. >>> I don't find any document about GCC and ICC's behavior and the generated code doesn't make much sense to me. Besides, if we change "=rm" to "=r" or "=m", GCC and ICC will report error differently. Which gives me an impression that the use of constraint is undefined behav

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-07-30 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: jyu2, epastor, ABataev, kbsmith1, LuoYuanke. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang will crash if we tie a structure with a small size type. This patch adds chec