mkazantsev (Max Kazantsev)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 23 2017, 8:11 PM (77 w, 2 d)

Recent Activity

Yesterday

mkazantsev committed rL337435: [SCEV] Fix buggy behavior in getAddExpr with truncs.
[SCEV] Fix buggy behavior in getAddExpr with truncs
Wed, Jul 18, 6:51 PM
mkazantsev closed D49471: [SCEV] Fix buggy behavior in getAddExpr with truncs.
Wed, Jul 18, 6:51 PM
mkazantsev committed rL337379: [NFC] Make a test more neat.
[NFC] Make a test more neat
Wed, Jul 18, 4:08 AM
mkazantsev updated the diff for D49471: [SCEV] Fix buggy behavior in getAddExpr with truncs.
Wed, Jul 18, 4:08 AM
mkazantsev created D49471: [SCEV] Fix buggy behavior in getAddExpr with truncs.
Wed, Jul 18, 3:54 AM

Mon, Jul 9

mkazantsev added inline comments to D48853: [SCEV] Add [zs]ext{C,+,x} -> (D + [zs]ext{C-D,+,x})<nuw><nsw> transform.
Mon, Jul 9, 10:25 PM
mkazantsev added inline comments to D48853: [SCEV] Add [zs]ext{C,+,x} -> (D + [zs]ext{C-D,+,x})<nuw><nsw> transform.
Mon, Jul 9, 10:23 PM

Sun, Jul 8

mkazantsev added a comment to D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.

Ping.

Sun, Jul 8, 6:14 PM

Thu, Jul 5

mkazantsev added a comment to D48930: [InstCombine] Apply foldICmpUsingKnownBits to early bailout case.

I've reverted the original problematic change by rL336410. I think we need to collect tests that degrade from it to make this change properly.

Thu, Jul 5, 9:12 PM
mkazantsev committed rL336410: Revert "[InstCombine] Delay foldICmpUsingKnownBits until simple transforms are….
Revert "[InstCombine] Delay foldICmpUsingKnownBits until simple transforms are…
Thu, Jul 5, 9:09 PM
mkazantsev updated the diff for D47767: [SCEV] Drop cached info after late nsw/nuw flags setting.

I failed to construct pure SCEV test easily, will try unit test if needed.

Thu, Jul 5, 4:11 AM

Wed, Jul 4

mkazantsev added a comment to D48930: [InstCombine] Apply foldICmpUsingKnownBits to early bailout case.

The context is following: the patch rL336172 has broken this test, and I was asked to fix it.

I assumed that much. :)
But are there any other examples that were given to you? The solution may depend on how varied the breakage is. If it's just this case, then we can probably get by with a solution that doesn't need value tracking.

Wed, Jul 4, 6:53 PM
mkazantsev added a comment to D48930: [InstCombine] Apply foldICmpUsingKnownBits to early bailout case.

The context is following: the patch rL336172 has broken this test, and I was asked to fix it. Basically I just restored the behavior that we used to have before this sinking. I would prefer to not introduce any new transforms to InstCombine without dire need because it is fragile, and I am not familiar with it well enough (in particular, I don't understand ordering of particular transforms in many places). So I've chosen a conservative approach (to restore old behavior).

Wed, Jul 4, 9:36 AM
mkazantsev updated the summary of D48930: [InstCombine] Apply foldICmpUsingKnownBits to early bailout case.
Wed, Jul 4, 4:19 AM
mkazantsev created D48930: [InstCombine] Apply foldICmpUsingKnownBits to early bailout case.
Wed, Jul 4, 4:18 AM
mkazantsev committed rL336258: [NFC] Add test that shows that InstCombine can do better.
[NFC] Add test that shows that InstCombine can do better
Wed, Jul 4, 3:36 AM
mkazantsev committed rL336241: [ImplicitNullChecks] Check for rewrite of register used in 'test' instruction.
[ImplicitNullChecks] Check for rewrite of register used in 'test' instruction
Wed, Jul 4, 1:06 AM
mkazantsev closed D48627: [ImplicitNullChecks] Check for rewrite of register used in 'test' instruction.
Wed, Jul 4, 1:06 AM

Mon, Jul 2

mkazantsev committed rL336172: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.
[InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done
Mon, Jul 2, 11:29 PM
mkazantsev closed D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.
Mon, Jul 2, 11:28 PM
mkazantsev updated the diff for D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.

Rebased on top of pre-merged test, fixed comments.

Mon, Jul 2, 12:24 AM
mkazantsev committed rL336078: [NFC] Test that shows unprofitability of instcombine with bit ranges.
[NFC] Test that shows unprofitability of instcombine with bit ranges
Mon, Jul 2, 12:00 AM

Sun, Jul 1

mkazantsev updated the diff for D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.

Added some comments, removed one unnecessary lambda.

Sun, Jul 1, 7:51 PM
mkazantsev added inline comments to D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.
Sun, Jul 1, 7:46 PM
mkazantsev added inline comments to D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.
Sun, Jul 1, 7:28 PM

Fri, Jun 29

mkazantsev updated the diff for D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.
Fri, Jun 29, 4:47 AM
mkazantsev added inline comments to D48766: Fix overconfident assert in ScalarEvolution::isImpliedViaMerge.
Fri, Jun 29, 4:34 AM
mkazantsev accepted D48766: Fix overconfident assert in ScalarEvolution::isImpliedViaMerge.

LGTM

Fri, Jun 29, 4:34 AM
mkazantsev planned changes to D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.
Fri, Jun 29, 4:30 AM
mkazantsev created D48763: [SimplifyIndVar] Canonicalize comparisons to unsigned while eliminating truncs.
Fri, Jun 29, 4:21 AM

Thu, Jun 28

mkazantsev accepted D48599: SCEVExpander::expandAddRecExprLiterally(): check before casting as Instruction.

LGTM once a TODO comment is added.

Thu, Jun 28, 8:17 PM
mkazantsev added inline comments to D48599: SCEVExpander::expandAddRecExprLiterally(): check before casting as Instruction.
Thu, Jun 28, 2:52 AM
mkazantsev added a comment to D48599: SCEVExpander::expandAddRecExprLiterally(): check before casting as Instruction.

Frankly, I don't understand why we want it to be an instruction at all. Can these methods (i.e. hoistIVInc and isNormalAddRecExprPHI) be taught to work with values? For example, if it is not an instruction then we just consider it already hoisted.

Thu, Jun 28, 2:49 AM
mkazantsev committed rL335816: [IndVarSimplify] Ignore unreachable users of truncs.
[IndVarSimplify] Ignore unreachable users of truncs
Thu, Jun 28, 1:24 AM

Wed, Jun 27

mkazantsev added inline comments to D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.
Wed, Jun 27, 7:55 PM
mkazantsev updated the diff for D40293: [NFC] Factor out implicit control flow logic from GVN.

Moved fill to private API, added lazy calculations, overall it is now more user-friendly.

Wed, Jun 27, 4:06 AM

Tue, Jun 26

mkazantsev updated the diff for D40293: [NFC] Factor out implicit control flow logic from GVN.

Rebased. We need to reanimate this.

Tue, Jun 26, 11:34 PM
mkazantsev updated the diff for D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.

Sinking it to the end of method did not introduce any new changes. Also added a comment.

Tue, Jun 26, 9:07 PM
mkazantsev added a comment to D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.

This only moves the foldICmpUsingKnownBits() call later on,
but in PR37636 @spatel suggests it *might* expose more problems.
Does this expose any problems?

Tue, Jun 26, 6:58 PM
mkazantsev updated the diff for D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.
Tue, Jun 26, 12:22 AM
mkazantsev added a comment to D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.

This only moves the foldICmpUsingKnownBits() call later on,
but in PR37636 @spatel suggests it *might* expose more problems.
Does this expose any problems?

Tue, Jun 26, 12:19 AM

Mon, Jun 25

mkazantsev updated the diff for D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.
Mon, Jun 25, 11:49 PM
mkazantsev created D48584: [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done.
Mon, Jun 25, 11:00 PM

Wed, Jun 20

mkazantsev accepted D48229: [NFC][SCEV] Add tests related to bit masking (PR37793).

LGTM

Wed, Jun 20, 12:19 AM

Tue, Jun 19

mkazantsev abandoned D44461: [SCEV] Consider guards in exit limit computation.
Tue, Jun 19, 8:12 PM

Jun 18 2018

mkazantsev committed rL335020: [SimplifyIndVars] Eliminate redundant truncs.
[SimplifyIndVars] Eliminate redundant truncs
Jun 18 2018, 9:53 PM
This revision was not accepted when it landed; it landed in state Changes Planned.
Jun 18 2018, 9:53 PM
mkazantsev added inline comments to D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 18 2018, 9:22 PM
mkazantsev planned changes to D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 18 2018, 8:13 PM
mkazantsev added inline comments to D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 18 2018, 8:13 PM

Jun 14 2018

mkazantsev added a comment to rL334715: [EarlyCSE] Fix MSVC build. NFCI..

Thanks for fixing that!

Jun 14 2018, 9:25 AM
mkazantsev committed rL334707: [EarlyCSE] Propagate conditions of AND and OR instructions.
[EarlyCSE] Propagate conditions of AND and OR instructions
Jun 14 2018, 6:06 AM
mkazantsev closed D47574: [EarlyCSE] Propagate conditions of AND and OR instructions.
Jun 14 2018, 6:06 AM

Jun 13 2018

mkazantsev updated the diff for D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 13 2018, 12:58 AM

Jun 12 2018

mkazantsev added a reviewer for D47574: [EarlyCSE] Propagate conditions of AND and OR instructions: apilipenko.
Jun 12 2018, 8:36 PM
mkazantsev planned changes to D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 12 2018, 8:05 PM
mkazantsev committed rL334567: [SimplifyIndVars] Ignore dead users.
[SimplifyIndVars] Ignore dead users
Jun 12 2018, 7:30 PM
mkazantsev closed D47974: [SimplifyIndVars] Ignore dead users.
Jun 12 2018, 7:29 PM
mkazantsev added inline comments to D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 12 2018, 6:46 PM
mkazantsev added inline comments to D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 12 2018, 6:43 PM
mkazantsev accepted D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..

LGTM

Jun 12 2018, 5:54 PM

Jun 8 2018

mkazantsev created D47974: [SimplifyIndVars] Ignore dead users.
Jun 8 2018, 11:06 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 8 2018, 10:59 PM
mkazantsev added a comment to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..

Not sure how to construct a test that will fail an assert, however the general idea is that, for example, a block that goes to method exit from the innermost look is also an exiting block for all its containing loops, up to the topmost parent. It means that this exiting block may be considered for iter count calculation for all those loops. From this point of view, there is no practical difference between the immediate parent and any other top loop.

Jun 8 2018, 10:57 PM

Jun 7 2018

mkazantsev created D47928: [SimplifyIndVars] Eliminate redundant truncs.
Jun 7 2018, 11:08 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 7 2018, 8:03 PM
mkazantsev committed rL334173: [NFC] Use variable instead of accessing pair many times.
[NFC] Use variable instead of accessing pair many times
Jun 7 2018, 1:51 AM

Jun 6 2018

mkazantsev added inline comments to D45439: [IRCE] Use NUW flag for indvar.
Jun 6 2018, 8:41 PM
mkazantsev added inline comments to D45439: [IRCE] Use NUW flag for indvar.
Jun 6 2018, 8:40 PM

Jun 5 2018

mkazantsev created D47767: [SCEV] Drop cached info after late nsw/nuw flags setting.
Jun 5 2018, 4:34 AM

Jun 4 2018

mkazantsev added a comment to D47574: [EarlyCSE] Propagate conditions of AND and OR instructions.

I will do it as a follow-up then.

Jun 4 2018, 8:50 PM
mkazantsev added a comment to D47574: [EarlyCSE] Propagate conditions of AND and OR instructions.

I'm not sure if it gives benefits, but the idea is interesting. Do you mind if it goes as a follow-up?

Jun 4 2018, 1:02 AM

Jun 3 2018

mkazantsev updated the diff for D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 3 2018, 11:02 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 3 2018, 10:02 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 3 2018, 9:20 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 3 2018, 9:09 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 3 2018, 8:41 PM
mkazantsev added inline comments to D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 3 2018, 6:50 PM

Jun 1 2018

mkazantsev created D47624: [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when unswitching loops..
Jun 1 2018, 3:41 AM

May 31 2018

mkazantsev updated the diff for D47574: [EarlyCSE] Propagate conditions of AND and OR instructions.
May 31 2018, 1:34 AM
mkazantsev created D47574: [EarlyCSE] Propagate conditions of AND and OR instructions.
May 31 2018, 1:18 AM
mkazantsev committed rL333633: [NFC] Factor out a method for further extension.
[NFC] Factor out a method for further extension
May 31 2018, 1:12 AM

May 23 2018

mkazantsev committed rL333072: [LoopUnswitch] Fix SCEV invalidation in unswitching.
[LoopUnswitch] Fix SCEV invalidation in unswitching
May 23 2018, 3:13 AM
mkazantsev closed D46045: [LoopUnswitch] Fix SCEV invalidation in unswitching.
May 23 2018, 3:13 AM

May 21 2018

mkazantsev added a comment to D46045: [LoopUnswitch] Fix SCEV invalidation in unswitching.

Ping?

May 21 2018, 7:23 AM

May 19 2018

mkazantsev committed rL332809: [IRCE] Fix miscompile with range checks against negative values.
[IRCE] Fix miscompile with range checks against negative values
May 19 2018, 6:10 AM
mkazantsev closed D46860: [IRCE] Fix miscompile with range checks against negative values.
May 19 2018, 6:10 AM

May 14 2018

mkazantsev updated the summary of D46860: [IRCE] Fix miscompile with range checks against negative values.
May 14 2018, 7:29 PM
mkazantsev created D46860: [IRCE] Fix miscompile with range checks against negative values.
May 14 2018, 7:25 PM
mkazantsev committed rL332317: [NFC] Add const to method signature.
[NFC] Add const to method signature
May 14 2018, 6:25 PM

May 6 2018

mkazantsev resigned from D44160: [GVN] Don't use the eliminated load as an available value in phi construction.
May 6 2018, 11:50 PM
mkazantsev accepted D46203: [InstCombine] Widen guards with conditions between.

LGTM once comments are addressed.

May 6 2018, 11:44 PM

May 4 2018

mkazantsev added inline comments to D45617: [IRCE] Only check for NSW on equality predicates.
May 4 2018, 12:42 AM
mkazantsev committed rL331508: [IRCE] Fix misuse of dyn_cast which leads to UB.
[IRCE] Fix misuse of dyn_cast which leads to UB
May 4 2018, 12:38 AM

May 3 2018

mkazantsev added a comment to D46045: [LoopUnswitch] Fix SCEV invalidation in unswitching.

Never mind, in this case the latch of outer loop changes, so we must clear cache.

May 3 2018, 3:01 AM
mkazantsev added a comment to D46045: [LoopUnswitch] Fix SCEV invalidation in unswitching.

Actually particularly with case of unswitching, I grow hesitant about one of our asserts that fails here. Maybe it is over-conservative. See comment https://reviews.llvm.org/D44676#1086144

May 3 2018, 2:01 AM
mkazantsev added inline comments to D44676: [SCEV] Make exact taken count calculation more optimistic.
May 3 2018, 1:59 AM

May 2 2018

mkazantsev updated the diff for D46045: [LoopUnswitch] Fix SCEV invalidation in unswitching.

This one appeared to be a real bug, at least we have a test that fails with assert for trivial unswitching. Thanks @uabelho for providing the test case.

May 2 2018, 8:54 PM
mkazantsev added a comment to D44677: [SCEV] Make computeExitLimit more simple and more powerful.

I am not sure that we actually break the invariant which was preserved before. Note that all recent failures we have seen were on assert from the patch D44676. We might as well just break this invariant previously, but without this assert we did not know about it.

May 2 2018, 8:31 PM
mkazantsev committed rL331427: Re-enable "[SCEV] Make computeExitLimit more simple and more powerful".
Re-enable "[SCEV] Make computeExitLimit more simple and more powerful"
May 2 2018, 7:42 PM