[PATCH] D93793: [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder

2020-12-29 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune marked an inline comment as done. aqjune added inline comments. Comment at: llvm/lib/IR/IRBuilder.cpp:1020 Value *Zeros = ConstantAggregateZero::get(VectorType::get(I32Ty, EC)); - return CreateShuffleVector(V, Undef, Zeros, Name + ".splat"); + return CreateShuffleVect

[PATCH] D93793: [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as placeholder

2020-12-29 Thread Juneyoung Lee via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. aqjune marked an inline comment as done. Closed by commit rG278aa65cc495: [IR] Let IRBuilder's CreateVectorSplat/CreateShuffleVector use poison as… (authored by aqjune)

[PATCH] D93923: Use unary CreateShuffleVector if possible

2020-12-29 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune created this revision. aqjune added reviewers: spatel, nikic, lebedev.ri, craig.topper, RKSimon, efriedma. Herald added subscribers: dexonsmith, kerbowa, pengfei, dmgreen, hiraditya, nhaehnle, jvesely, nemanjai, arsenm. aqjune requested review of this revision. Herald added projects: clang

[PATCH] D93923: Use unary CreateShuffleVector if possible

2020-12-29 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:2260 - V = IRB.CreateSelect(ConstantVector::get(Mask), V, Old, Name + "blend"); + V = IRB.CreateSelect(ConstantVector::get(Mask2), V, Old, Name + "blend"); LLVM_DEBUG(dbgs() << "blend: " << *

[PATCH] D93923: Use unary CreateShuffleVector if possible

2020-12-30 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Thanks! :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93923/new/ https://reviews.llvm.org/D93923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D93923: Use unary CreateShuffleVector if possible

2020-12-30 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 314108. aqjune added a comment. - clang-format, address warnings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93923/new/ https://reviews.llvm.org/D93923 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/Cod

[PATCH] D93923: Use unary CreateShuffleVector if possible

2020-12-30 Thread Juneyoung Lee 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 rG9b29610228c8: Use unary CreateShuffleVector if possible (authored by aqjune). Changed prior to commit: https://reviews.llvm.org/D93923?vs=314108&i

[PATCH] D93817: Update transformations to use poison for new insertelement's placeholder value

2020-12-30 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 314123. aqjune added a comment. Herald added subscribers: cfe-commits, pengfei, aheejin, jgravelle-google, sbc100, dschuff. Herald added a project: clang. Rebase, update transformations with shufflevector involved too Repository: rG LLVM Github Monorepo C

[PATCH] D93817: Update transformations to use poison for insertelement/shufflevector's placeholder value

2020-12-30 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. I'll share the result after checking the validity of this patch using alive2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93817/new/ https://reviews.llvm.org/D93817 ___ cfe-comm

[PATCH] D93817: Update transformations to use poison for insertelement/shufflevector's placeholder value

2020-12-31 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 314175. aqjune added a comment. Find a few missing places & update them to use poison Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93817/new/ https://reviews.llvm.org/D93817 Files: clang/test/CodeGen/SystemZ

[PATCH] D93817: Update transformations to use poison for insertelement/shufflevector's placeholder value

2020-12-31 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Running Alive2 finds one failure, which is fixed by updating the shufflevector semantics to return poison on undef/poison mask (D93818 ): Transforms/InstCombine/shufflevector-div-rem-inseltpoison.ll

[PATCH] D93817: Update transformations to use poison for insertelement/shufflevector's placeholder value

2021-01-02 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. I'll split this patch into smaller pieces, so they're able to get reviewed more easily. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93817/new/ https://reviews.llvm.org/D93817 _

[PATCH] D93817: Update transformations to use poison for insertelement/shufflevector's placeholder value

2021-01-03 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 314289. aqjune added a comment. Rebase I'll continue splitting after working on lifetime patches Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93817/new/ https://reviews.llvm.org/D93817 Files: clang/test/Code

[PATCH] D92270: [ConstantFold] Fold more operations to poison

2021-01-06 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D92270#2482741 , @thakis wrote: > We bisected a test failure to this > (https://bugs.chromium.org/p/angleproject/issues/detail?id=5500#c17). Can you > expand a bit on what this patch means in practice? I'm guessing it makes UB

[PATCH] D92270: [ConstantFold] Fold more operations to poison

2021-01-06 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. To fix the old bug quite a few patches in LLVM have landed so far and it is still ongoing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92270/new/ https://reviews.llvm.org/D92270 __

[PATCH] D92270: [ConstantFold] Fold more operations to poison

2021-01-07 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D92270#2483557 , @thakis wrote: > It turned out to be UB in our code as far as I can tell, see > https://bugs.chromium.org/p/angleproject/issues/detail?id=5500#c36 and the > follow-on. > > (If this is known to trigger an existi

[PATCH] D94380: [InstCombine] Update transformations to use poison for insertelement/shufflevector's placeholder value (1/2)

2021-01-10 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:1728 // Vec. if (IdxN % DstNumElts != 0 || IdxN + DstNumElts > VecNumElts) { replaceInstUsesWith(CI, UndefValue::get(CI.getType())); Guarded by t

[PATCH] D93817: [InstCombine] Update transformations to use poison for insertelement/shufflevector's placeholder value (2/2)

2021-01-10 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1221 if (!isa(I->getOperand(1))) { -I->setOperand(1, UndefValue::get(I->getOperand(1)->getType())); MadeChange = true; This change is

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-10-07 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Thank you! I'll send a mail to cfe-dev + llvm-dev to notify the change (and gather any possible concern if exists). If there is no objection in a week, let's land these patches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-10-15 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. There has been no concern in a week, so I'd like to land this patch and D108453 in this weekend. I'll carefully watch the buildbots and address failures if any. @eugenis could you accept this patch and D108453

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-10-17 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. I can see that `@ff_seek_frame_binary` is the only affected function. It introduces `llvm.assume` as well as `!nonnull` at a few places and folds null pointer checks. Still investigating.. F19677416: before.ll F19677415: after.ll

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-10-17 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. It seems the original code has a use of an uninitialized variable. Line 4420 at seek-preproc.c (function `ff_seek_frame_binary`): int64_t pos_min=pos_min, pos_max=pos_max, pos, pos_limit; // pos_min and pos_max are self-assigned. ... if (sti->index_entries) {

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-10-18 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D105169#3069417 , @mstorsjo wrote: > Yes, I believe so. If the branch is not taken, `pos_min` and `pos_max` are > undefined when entering `ff_gen_search`. (I would assume that their value > isn't ever used within `ff_gen_searc

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-10-18 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. I will revert this patch, since its fix needs some time for me to investigate. I have access to an AArch server, so I can give it a try by myself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105169/new/ https://reviews.llv

[PATCH] D105169: [Clang/Test]: Enable enable_noundef_analysis by default

2021-08-22 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 368033. aqjune added a comment. Rename `disable-noundef-args` to `disable-noundef-analysis` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105169/new/ https://reviews.llvm.org/D105169 Files: clang/include/clan

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2021-08-22 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Hello all, I'm a messenger of @hyeongyukim's two patches that allow clang to turn on noundef analysis by default. The noundef analysis flag was added by D81678 in the past. Its goal is to mark arguments and return values in C/C++ as `no

[PATCH] D108453: [Clang/Test]: Enable enable_noundef_analysis as default(2)

2021-08-23 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 368034. aqjune added a comment. Rebase, rename `disable-noundef-args` to `disable-noundef-analysis`, remove redundant diffs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108453/new/ https://reviews.llvm.org/D10

[PATCH] D108453: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default (2)

2021-08-23 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Hello all, I'm a messenger of @hyeongyukim's two patches that allow clang to turn on noundef analysis by default. The motivation and background of these patches are described at https://reviews.llvm.org/D105169#2959464. Here is a list of tests that has `RUN: %clang_cc1`

<    1   2