[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-31 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added a comment. In D130224#3688067 , @amyk wrote: > In D130224#3688034 , @skc7 wrote: > >> In D130224#3687907 , >> @aaron.ballman wrote: >> >>> In D130224#3687860 <

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-29 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added a comment. In D130224#3687907 , @aaron.ballman wrote: > In D130224#3687860 , @amyk wrote: > >> In D130224#3687487 , @mubarizafzal >> wrote: >> >>> Hi, the tes

[PATCH] D130790: Fix failing tests for "[Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values"

2022-07-29 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. skc7 added reviewers: aaron.ballman, ronlieb, arsenm. Herald added a subscriber: pengfei. Herald added a project: All. skc7 requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. Add target triple x86_64-gnu-linux

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-28 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa35c64ce23b7: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which… (authored by skc7). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-28 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added inline comments. Comment at: clang/test/CodeGen/attr-maybeundef.c:48 + +// CHECK: declare void @VariadicFunction(i32 noundef, ...) + aaron.ballman wrote: > It looks like dso_local is missing here on Windows and expected to be missing > on Linux? Not c

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-28 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 448361. skc7 added a comment. Fix windows tests failure CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/C

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-28 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 448330. skc7 marked an inline comment as not done. skc7 added a comment. Fix tests failures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Ba

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2050-2066 +static bool IsArgumentMayBeUndef(const Decl *TargetDecl, unsigned ArgNo) { + if (!TargetDecl) +return false; + + bool ArgHasMayBeUndefAttr = false; + if (TargetDecl) { +if (const FunctionDe

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 447993. skc7 added a comment. Changes for code review comments from @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDo

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-25 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 447383. skc7 edited the summary of this revision. skc7 added a comment. Rebase. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/Att

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-22 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 446919. skc7 added a comment. Fixes as per review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeG

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-21 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 446727. skc7 edited the summary of this revision. skc7 added a comment. Rebase. Remove skipping noundef attribute based on maybe_undef. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130224/new/ https://reviews.llvm.org/D130224 Files: clang/include/c

[PATCH] D130224: [Clang][Attribute] Introduce maybe_undef attribute for function arguments which accepts undef values

2022-07-21 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. skc7 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add the ability to put __attribute__((maybe_undef))

[PATCH] D128907: [Clang] Disable noundef attribute for languages which allow uninitialized function arguments

2022-07-14 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 444657. skc7 added a comment. Rebase and fix for review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128907/new/ https://reviews.llvm.org/D128907 Files: clang/include/clang/Basic/LangOptions.h clan

[PATCH] D128907: [Clang] Disable noundef attribute for languages which allow uninitialized function arguments

2022-06-30 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 441409. skc7 added a comment. Add description for allowUninitializedFunctionsArgs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128907/new/ https://reviews.llvm.org/D128907 Files: clang/include/clang/Basic/Lang

[PATCH] D128700: [AMDGPU][Clang] Skip adding noundef attribute to AMDGPU HIP device functions

2022-06-30 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2309 + bool EnableNoundefAttrs = CodeGenOpts.EnableNoundefAttrs && +!(getLangOpts().HIP && getLangOpts().CUDAIsDevice); + arsenm wrote: > Shouldn't be limited to HIP

[PATCH] D128907: [Clang] Disable noundef attribute for languages which allow uninitialized function arguments

2022-06-30 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. skc7 added reviewers: arsenm, sameerds, cdevadas, ronlieb, yaxunl, b-sumner, bcahoon. Herald added subscribers: kosarev, mattd, asavonic, ThomasRaoux, jdoerfert, kerbowa, kbarton, jvesely, nemanjai. Herald added a project: All. skc7 requested review of this revision. H

[PATCH] D128700: [AMDGPU][Clang] Skip adding noundef attribute to AMDGPU HIP device functions

2022-06-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. Herald added subscribers: kosarev, kerbowa, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl. Herald added a project: All. skc7 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, wdng. Herald added projects: clang, LLVM. Noundef att

[PATCH] D125378: [Attribute] Introduce shuffle attribute to be used for __shfl_sync like cross-lane APIs

2022-05-11 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added a comment. In D125378#3506215 , @jdoerfert wrote: > In D125378#3506001 , @nikic wrote: > >> Please specify the semantics of the new LLVM attribute in LangRef -- though >> I don't really understand why

[PATCH] D125378: [Attribute] Introduce shuffle attribute to be used for __shfl_sync like cross-lane APIs

2022-05-11 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 428637. skc7 added a comment. rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125378/new/ https://reviews.llvm.org/D125378 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/CGCall.cpp clang/l

[PATCH] D125378: [Attribute] Introduce shuffle attribute to be used for __shfl_sync like cross-lane APIs

2022-05-11 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 428635. skc7 added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125378/new/ https://reviews.llvm.org/D125378 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/lib/CodeGen/CGCall.cpp c

[PATCH] D125378: [Attribute] Introduce shuffle attribute to be used for __shfl_sync like cross-lane APIs

2022-05-11 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. Herald added subscribers: jdoerfert, hiraditya. Herald added a reviewer: aaron.ballman. Herald added a project: All. skc7 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This change introduces s

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added a comment. In D124158#3477281 , @jdoerfert wrote: >> For Ex: SimplifyCFG pass removes the branch leading to a BB which has an >> incoming value that will always trigger undefined behavior. This basically >> modifies the CFG and combines the b

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added inline comments. Comment at: llvm/test/Transforms/SimplifyCFG/tautological-conditional-branch-convergent-noundef.ll:26 + %i3 = phi double [%i2, %bb2], [undef, %bb1] + %i4 = call noundef double @two(double %i3, i1 %i1) + ret void skc7 wrote: > ars

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425463. skc7 added a comment. update test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/PowerPC/ppc64le-vara

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425458. skc7 added a comment. skip adding noundef to return type Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeG

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-27 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425442. skc7 added a comment. fix failing tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/PowerPC/ppc64l

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2435 DetermineNoUndef(ParamType, getTypes(), DL, AI)) { - Attrs.addAttribute(llvm::Attribute::NoUndef); + if(!FuncAttrs.contains(llvm::Attribute::Convergent)) +Attrs.addAttribute(llvm:

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425394. skc7 added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files: clang/lib/CodeGen/CGCall.cpp clang/test/CodeGen/PowerPC/ppc64le-varargs-f

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 425393. skc7 added a comment. clang-format to CGCall.cpp. Added comment for the change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124158/new/ https://reviews.llvm.org/D124158 Files: clang/lib/CodeGen/CGCall.

[PATCH] D124496: [Clang][Attr] clanf-format update

2022-04-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. Herald added a project: All. skc7 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D124496 Files: clang/lib/CodeGen/CGCall.cpp Index: clang/lib/

[PATCH] D124158: [Clang][Attr] Skip adding noundef attribute to arguments when function has convergent attribute

2022-04-21 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. skc7 added reviewers: sameerds, cdevadas, ronlieb. Herald added subscribers: mattd, asavonic, ThomasRaoux, jdoerfert, kerbowa, kbarton, jvesely, nemanjai. Herald added a project: All. skc7 requested review of this revision. Herald added a reviewer: jdoerfert. Herald add

[PATCH] D114533: LLVM IR should allow bitcast between address spaces with the same size.

2022-02-07 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 406351. skc7 added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114533/new/ https://reviews.llvm.org/D114533 Files: clang/lib/CodeGen/CGAtomic.cpp llvm/docs/LangRef.rst llvm/include/llvm/Analysis/InstSimplifyFolder.h llvm/in

[PATCH] D114533: LLVM IR should allow bitcast between address spaces with the same size.

2021-12-04 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 391836. skc7 added a comment. updated test IR files. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114533/new/ https://reviews.llvm.org/D114533 Files: clang/lib/CodeGen/CGAtomic.cpp llvm/docs/LangRef.rst llvm/include/llvm/Analysis/TargetFolder.h

[PATCH] D114849: [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU

2021-12-01 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG16b781e6d16d: [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU (authored by skc7). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D114849: [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU

2021-12-01 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 391023. skc7 added a comment. added new life at eof amdgcn-non-temporal-store.cl CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114849/new/ https://reviews.llvm.org/D114849 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGenOpenCL/amdgcn-non-

[PATCH] D114849: [AMDGPU][clang] Fix __builtin_nontemporal_store() failure on AMDGPU

2021-11-30 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. skc7 added reviewers: sameerds, yaxunl. Herald added subscribers: t-tye, tpr, dstuttard, jvesely, kzhuravl. skc7 requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. __builtin_nontemporal_store() fails on AMDGPU.

[PATCH] D114533: LLVM IR should allow bitcast between address spaces with the same size.

2021-11-26 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 updated this revision to Diff 389983. skc7 added a comment. Updated diff with changes suggested by jrtc27 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114533/new/ https://reviews.llvm.org/D114533 Files: clang/lib/CodeGen/CGAtomic.cpp llvm/docs/LangRef.rst llvm/include/llvm/

[PATCH] D114533: LLVM IR should allow bitcast between address spaces with the same size.

2021-11-24 Thread krishna chaitanya sankisa via Phabricator via cfe-commits
skc7 created this revision. skc7 added reviewers: sameerds, arsenm. Herald added subscribers: dexonsmith, lxfind, jdoerfert, zzheng, hiraditya. skc7 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, wdng. Herald added projects: clang, LLVM. When the addrspacec