[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Kolya Panchenko via cfe-commits
https://github.com/nikolaypanchenko created https://github.com/llvm/llvm-project/pull/89943 The changeset aims to keep Clang's behavior prior to `7339c0f` and to match current behavior in GCC until GCC community decides what should be default: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11084

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Kolya Panchenko via cfe-commits
nikolaypanchenko wrote: > This was discussed in this RFC: > https://discourse.llvm.org/t/rfc-diagnosing-use-of-vlas-in-c/73109 and our > decision to move forward with that is independent of what GCC does. I saw that discussion, but I do miss where it has been agreed to diverge from GCC on th

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Kolya Panchenko via cfe-commits
https://github.com/nikolaypanchenko closed https://github.com/llvm/llvm-project/pull/89943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Don't diagnose VLA for `-std=gnu++*` by default (PR #89943)

2024-04-24 Thread Kolya Panchenko via cfe-commits
nikolaypanchenko wrote: @AaronBallman @erichkeane thanks for the feedback. It's safe to close the PR then https://github.com/llvm/llvm-project/pull/89943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-31 Thread Kolya Panchenko via cfe-commits
@@ -6,9 +6,43 @@ define void @switch_default_to_latch_common_dest(ptr %start, ptr %end) { ; IC1-LABEL: define void @switch_default_to_latch_common_dest( ; IC1-SAME: ptr [[START:%.*]], ptr [[END:%.*]]) #[[ATTR0:[0-9]+]] { ; IC1-NEXT: [[ENTRY:.*]]: +; IC1-NEXT:[[START2:%.*]

[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-31 Thread Kolya Panchenko via cfe-commits
https://github.com/nikolaypanchenko edited https://github.com/llvm/llvm-project/pull/99808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-31 Thread Kolya Panchenko via cfe-commits
https://github.com/nikolaypanchenko commented: Add tests for vplan printing ? https://github.com/llvm/llvm-project/pull/99808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-31 Thread Kolya Panchenko via cfe-commits
@@ -7763,6 +7763,41 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +// Create mask where the terminator in Src is a switch. We need to handle 2