Page MenuHomePhabricator

nikic (Nikita Popov)
User

Projects

User does not belong to any projects.

User Details

User Since
May 5 2018, 9:37 AM (45 w, 5 d)

Recent Activity

Today

nikic created D59668: [ValueTracking] Take signedness into account for and/or ranges.
Thu, Mar 21, 2:23 PM · Restricted Project
nikic committed rGb86576a5b945: [InstSimplify] Add tests for signed icmp of and/or; NFC (authored by nikic).
[InstSimplify] Add tests for signed icmp of and/or; NFC
Thu, Mar 21, 2:17 PM
nikic committed rL356720: [InstSimplify] Add tests for signed icmp of and/or; NFC.
[InstSimplify] Add tests for signed icmp of and/or; NFC
Thu, Mar 21, 2:11 PM
nikic added a comment to D59653: [NFC] Add tests for ssubo X, C -> saddo X, -C.

It would be good to also have test cases (for the ssubo->saddo canonicalization, not the nsw fold) where the vector constant argument of the ssubo has undef or is non-splat. This is one of those rare cases where we can easily support them, because the necessary machinery is already in place (see https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstCombineCalls.cpp#L2194).

Thu, Mar 21, 12:13 PM · Restricted Project
nikic committed rG3af5b28f4780: [ValueTracking] Use ConstantRange based overflow check for signed sub (authored by nikic).
[ValueTracking] Use ConstantRange based overflow check for signed sub
Thu, Mar 21, 10:24 AM
nikic committed rL356685: [ValueTracking] Use ConstantRange based overflow check for signed sub.
[ValueTracking] Use ConstantRange based overflow check for signed sub
Thu, Mar 21, 10:23 AM
nikic closed D59617: [ValueTracking] Use ConstantRange based overflow check for signed sub.
Thu, Mar 21, 10:23 AM · Restricted Project
nikic added a comment to D59006: [x86] improve the default expansion of uaddsat/usubsat.

This LG, but i'm not sure i understand how this is related to D59066?
Here, we are clearly end up with no select in ASM.
But in D59066 we expand to this pattern.
So there is something else that is able to do the transform that we do manually in D59066?
Should D59066 be doing something else to simply trigger the existing transform?

Thu, Mar 21, 10:23 AM · Restricted Project
nikic added inline comments to D59006: [x86] improve the default expansion of uaddsat/usubsat.
Thu, Mar 21, 10:00 AM · Restricted Project

Yesterday

nikic created D59617: [ValueTracking] Use ConstantRange based overflow check for signed sub.
Wed, Mar 20, 2:47 PM · Restricted Project
nikic committed rG03dbfc2eefdb: [InstCombine] Add additional sub nsw inference tests; NFC (authored by nikic).
[InstCombine] Add additional sub nsw inference tests; NFC
Wed, Mar 20, 2:42 PM
nikic committed rL356620: [InstCombine] Add additional sub nsw inference tests; NFC.
[InstCombine] Add additional sub nsw inference tests; NFC
Wed, Mar 20, 2:41 PM
nikic added inline comments to D59188: [DAGCombine] Fold insert_subvector(bitcast(x),bitcast(y)) -> bitcast(insert_subvector(x,y)).
Wed, Mar 20, 12:58 PM · Restricted Project
nikic added inline comments to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Wed, Mar 20, 11:48 AM · Restricted Project
nikic added inline comments to D59473: [ValueTracking] Avoid redundant known bits calculation in computeOverflowForSignedAdd().
Wed, Mar 20, 11:24 AM · Restricted Project
nikic committed rG00b5ecab5d81: [ValueTracking] Compute range for abs without nsw (authored by nikic).
[ValueTracking] Compute range for abs without nsw
Wed, Mar 20, 11:15 AM
nikic committed rL356586: [ValueTracking] Compute range for abs without nsw.
[ValueTracking] Compute range for abs without nsw
Wed, Mar 20, 11:15 AM
nikic closed D59563: [ValueTracking] Compute range for abs without nsw.
Wed, Mar 20, 11:15 AM · Restricted Project
nikic committed rG37cf25c3c681: [InstCombine] Fold add nuw + uadd.with.overflow (authored by nikic).
[InstCombine] Fold add nuw + uadd.with.overflow
Wed, Mar 20, 11:04 AM
nikic committed rL356584: [InstCombine] Fold add nuw + uadd.with.overflow.
[InstCombine] Fold add nuw + uadd.with.overflow
Wed, Mar 20, 10:59 AM
nikic closed D59471: [InstCombine] Fold add nuw + uadd.with.overflow.
Wed, Mar 20, 10:59 AM · Restricted Project

Tue, Mar 19

nikic added inline comments to D59563: [ValueTracking] Compute range for abs without nsw.
Tue, Mar 19, 2:32 PM · Restricted Project
nikic created D59563: [ValueTracking] Compute range for abs without nsw.
Tue, Mar 19, 2:19 PM · Restricted Project
nikic committed rG2dd1566e8bb9: [InstSimplify] Add additional cmp of abs without nsw tests; NFC (authored by nikic).
[InstSimplify] Add additional cmp of abs without nsw tests; NFC
Tue, Mar 19, 2:14 PM
nikic committed rL356520: [InstSimplify] Add additional cmp of abs without nsw tests; NFC.
[InstSimplify] Add additional cmp of abs without nsw tests; NFC
Tue, Mar 19, 2:14 PM
nikic added inline comments to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Tue, Mar 19, 1:04 PM · Restricted Project
nikic added inline comments to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Tue, Mar 19, 12:04 PM · Restricted Project
nikic added a comment to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().

I've updated the AMDGPU tests to check for min(max(x, 17), 12) being constant folded to 12. The reverse test for min(max(x, 12), 17) already exists, so it doesn't seem like adjusting those constants to prevent the constant folding would make sense.

Tue, Mar 19, 11:22 AM · Restricted Project
nikic updated the diff for D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().

Update AMDGPU tests, update for more InstCombine test changes.

Tue, Mar 19, 11:20 AM · Restricted Project
nikic committed rG208381953b29: [ValueTracking] Use computeConstantRange() for unsigned add/sub overflow (authored by nikic).
[ValueTracking] Use computeConstantRange() for unsigned add/sub overflow
Tue, Mar 19, 10:53 AM
nikic committed rL356489: [ValueTracking] Use computeConstantRange() for unsigned add/sub overflow.
[ValueTracking] Use computeConstantRange() for unsigned add/sub overflow
Tue, Mar 19, 10:53 AM
nikic closed D59386: [ValueTracking] ConstantRange based overflow detection for unsigned add/sub.
Tue, Mar 19, 10:53 AM · Restricted Project

Mon, Mar 18

nikic planned changes to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Mon, Mar 18, 3:30 PM · Restricted Project
nikic reopened D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().

Reverted this in rL356424 due to AMDGPU smed3.ll and umed3.ll test failures. Likely some constants will need to be adjusted to avoid always-true/false conditions.

Mon, Mar 18, 3:30 PM · Restricted Project
nikic committed rG3e9770d2dc28: Revert "[ValueTracking][InstSimplify] Support min/max selects in… (authored by nikic).
Revert "[ValueTracking][InstSimplify] Support min/max selects in…
Mon, Mar 18, 3:27 PM
nikic added a reverting change for rG106f0cdefb02: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange(): rG3e9770d2dc28: Revert "[ValueTracking][InstSimplify] Support min/max selects in….
Mon, Mar 18, 3:27 PM
nikic committed rL356424: Revert "[ValueTracking][InstSimplify] Support min/max selects in….
Revert "[ValueTracking][InstSimplify] Support min/max selects in…
Mon, Mar 18, 3:25 PM
nikic committed rG106f0cdefb02: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange() (authored by nikic).
[ValueTracking][InstSimplify] Support min/max selects in computeConstantRange()
Mon, Mar 18, 2:35 PM
nikic committed rG930341ba3066: [InstCombine] Add tests for add nuw + uaddo; NFC (authored by nikic).
[InstCombine] Add tests for add nuw + uaddo; NFC
Mon, Mar 18, 2:35 PM
nikic committed rL356415: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
[ValueTracking][InstSimplify] Support min/max selects in computeConstantRange()
Mon, Mar 18, 2:34 PM
nikic closed D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Mon, Mar 18, 2:34 PM · Restricted Project
nikic committed rL356414: [InstCombine] Add tests for add nuw + uaddo; NFC.
[InstCombine] Add tests for add nuw + uaddo; NFC
Mon, Mar 18, 2:34 PM
nikic closed D59472: [InstCombine] Add tests for add nuw + uaddo.
Mon, Mar 18, 2:34 PM · Restricted Project
nikic committed rGf89343bc47dc: [ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC (authored by nikic).
[ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC
Mon, Mar 18, 2:20 PM
nikic committed rG05baa9ee1aea: [InstSimplify] Add additional icmp of min/max tests; NFC (authored by nikic).
[InstSimplify] Add additional icmp of min/max tests; NFC
Mon, Mar 18, 2:19 PM
nikic committed rL356409: [ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC.
[ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC
Mon, Mar 18, 2:19 PM
nikic closed D59511: [ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC.
Mon, Mar 18, 2:18 PM · Restricted Project
nikic committed rL356408: [InstSimplify] Add additional icmp of min/max tests; NFC.
[InstSimplify] Add additional icmp of min/max tests; NFC
Mon, Mar 18, 2:18 PM
nikic added inline comments to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Mon, Mar 18, 2:02 PM · Restricted Project
nikic added a parent revision for D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange(): D59511: [ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC.
Mon, Mar 18, 1:51 PM · Restricted Project
nikic updated the diff for D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().

Base on D59511.

Mon, Mar 18, 1:51 PM · Restricted Project
nikic added a child revision for D59511: [ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC: D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Mon, Mar 18, 1:51 PM · Restricted Project
nikic created D59511: [ValueTracking][InstSimplify] Move abs handling into computeConstantRange(); NFC.
Mon, Mar 18, 1:48 PM · Restricted Project
nikic updated the diff for D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().

Move simplifyICmpWithAbsNabs() logic into computeConstantRange(). This eliminates the duplicate matchSelectPattern() call, and is more general (e.g. we can also benefit from this for the constant range based overflow checks).

Mon, Mar 18, 1:29 PM · Restricted Project
nikic added inline comments to D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Mon, Mar 18, 1:14 PM · Restricted Project
nikic committed rGc1d4fc8a6258: [InstCombine] Improve with.overflow intrinsic tests; NFC (authored by nikic).
[InstCombine] Improve with.overflow intrinsic tests; NFC
Mon, Mar 18, 1:08 PM
nikic committed rL356403: [InstCombine] Improve with.overflow intrinsic tests; NFC.
[InstCombine] Improve with.overflow intrinsic tests; NFC
Mon, Mar 18, 1:08 PM
nikic closed D59476: [InstCombine] Improve with.overflow intrinsic tests.
Mon, Mar 18, 1:08 PM · Restricted Project
nikic added inline comments to D59472: [InstCombine] Add tests for add nuw + uaddo.
Mon, Mar 18, 12:58 PM · Restricted Project
nikic added a comment to D59378: [InstCombine] Prevent icmp transform that can cause inf loop if part of min/max.

@spatel I've created D59506 for the InstSimplify change.

Mon, Mar 18, 12:47 PM · Restricted Project
nikic created D59506: [ValueTracking][InstSimplify] Support min/max selects in computeConstantRange().
Mon, Mar 18, 12:43 PM · Restricted Project
nikic added inline comments to D59386: [ValueTracking] ConstantRange based overflow detection for unsigned add/sub.
Mon, Mar 18, 11:05 AM · Restricted Project
nikic updated the diff for D59386: [ValueTracking] ConstantRange based overflow detection for unsigned add/sub.

Rebase and remove constant vector code.

Mon, Mar 18, 11:02 AM · Restricted Project
nikic added a comment to rL356338: [InstCombine] canonicalize rotate right by constant to rotate left.

Thanks!

Mon, Mar 18, 8:42 AM

Sun, Mar 17

nikic added inline comments to D59473: [ValueTracking] Avoid redundant known bits calculation in computeOverflowForSignedAdd().
Sun, Mar 17, 2:42 PM · Restricted Project
nikic added inline comments to D59450: [ValueTracking] Use ConstantRange overflow check for signed add (NFC).
Sun, Mar 17, 2:32 PM · Restricted Project
nikic added inline comments to D59475: [ConstantRange] Add fromKnownBits() method.
Sun, Mar 17, 2:31 PM · Restricted Project
nikic committed rG5e7b62de0560: [ConstantRange] Add assertion for KnownBits validity; NFC (authored by nikic).
[ConstantRange] Add assertion for KnownBits validity; NFC
Sun, Mar 17, 2:28 PM
nikic committed rG322e2dbee128: [ValueTracking] Use ConstantRange overflow check for signed add; NFC (authored by nikic).
[ValueTracking] Use ConstantRange overflow check for signed add; NFC
Sun, Mar 17, 2:28 PM
nikic committed rL356346: [ConstantRange] Add assertion for KnownBits validity; NFC.
[ConstantRange] Add assertion for KnownBits validity; NFC
Sun, Mar 17, 2:27 PM
nikic committed rL356345: [ValueTracking] Use ConstantRange overflow check for signed add; NFC.
[ValueTracking] Use ConstantRange overflow check for signed add; NFC
Sun, Mar 17, 2:27 PM
nikic closed D59450: [ValueTracking] Use ConstantRange overflow check for signed add (NFC).
Sun, Mar 17, 2:27 PM · Restricted Project
nikic added inline comments to D59450: [ValueTracking] Use ConstantRange overflow check for signed add (NFC).
Sun, Mar 17, 1:49 PM · Restricted Project
nikic added a comment to rL356338: [InstCombine] canonicalize rotate right by constant to rotate left.

Any particular reason to limit this to rotates only? This should be valid for funnel shifts in general.

Sun, Mar 17, 1:36 PM
nikic updated the diff for D59450: [ValueTracking] Use ConstantRange overflow check for signed add (NFC).

Switch to ConstantRange::fromKnownBits().

Sun, Mar 17, 1:30 PM · Restricted Project
nikic committed rGef2d97994358: [ConstantRange] Add fromKnownBits() method (authored by nikic).
[ConstantRange] Add fromKnownBits() method
Sun, Mar 17, 1:23 PM
nikic committed rL356339: [ConstantRange] Add fromKnownBits() method.
[ConstantRange] Add fromKnownBits() method
Sun, Mar 17, 1:23 PM
nikic closed D59475: [ConstantRange] Add fromKnownBits() method.
Sun, Mar 17, 1:23 PM · Restricted Project
nikic updated the diff for D59475: [ConstantRange] Add fromKnownBits() method.

Add exhaustive test.

Sun, Mar 17, 1:06 PM · Restricted Project
nikic created D59475: [ConstantRange] Add fromKnownBits() method.
Sun, Mar 17, 11:30 AM · Restricted Project
nikic added a comment to D59378: [InstCombine] Prevent icmp transform that can cause inf loop if part of min/max.

I'd prefer that we IR simplify our way out of this infinite loop instead of looking the other way though. Ie, can we get this in instsimplify using a ConstantRange?

Sun, Mar 17, 9:48 AM · Restricted Project
nikic created D59473: [ValueTracking] Avoid redundant known bits calculation in computeOverflowForSignedAdd().
Sun, Mar 17, 9:32 AM · Restricted Project
nikic added inline comments to D59174: [DAGCombine] Fold (x & ~y) | y patterns.
Sun, Mar 17, 8:54 AM · Restricted Project
nikic committed rG9a4453592bfe: [DAGCombine] Fold (x & ~y) | y patterns (authored by nikic).
[DAGCombine] Fold (x & ~y) | y patterns
Sun, Mar 17, 8:45 AM
nikic committed rL356333: [DAGCombine] Fold (x & ~y) | y patterns.
[DAGCombine] Fold (x & ~y) | y patterns
Sun, Mar 17, 8:44 AM
nikic closed D59174: [DAGCombine] Fold (x & ~y) | y patterns.
Sun, Mar 17, 8:44 AM · Restricted Project
nikic added inline comments to D59174: [DAGCombine] Fold (x & ~y) | y patterns.
Sun, Mar 17, 6:37 AM · Restricted Project
nikic updated the diff for D59174: [DAGCombine] Fold (x & ~y) | y patterns.

Add visitORCommutative() function to reduce code duplication when matching commuting patterns.

Sun, Mar 17, 6:33 AM · Restricted Project
nikic added inline comments to D59174: [DAGCombine] Fold (x & ~y) | y patterns.
Sun, Mar 17, 4:08 AM · Restricted Project
nikic updated the diff for D59174: [DAGCombine] Fold (x & ~y) | y patterns.

Handle more commuted variants.

Sun, Mar 17, 3:58 AM · Restricted Project
nikic added a comment to D59386: [ValueTracking] ConstantRange based overflow detection for unsigned add/sub.

Are there any concerns of performance impact of using ConstantRange() here ?

Sun, Mar 17, 3:17 AM · Restricted Project
nikic added a comment to D59450: [ValueTracking] Use ConstantRange overflow check for signed add (NFC).

So is it NFC (not counting the AlwaysOverflows) or not?

Sun, Mar 17, 2:53 AM · Restricted Project

Sat, Mar 16

nikic added a comment to D59071: [Transform] Improve saddo with mixed signs.

D59386 implements the full optimization for the unsigned case, and D59450 is preparation for the signed add case, though there's a few more followups necessary there (for signed sub, for extension to use computeConstantRange, and for handling AlwaysOverflows).

Sat, Mar 16, 5:28 AM · Restricted Project
nikic created D59450: [ValueTracking] Use ConstantRange overflow check for signed add (NFC).
Sat, Mar 16, 3:30 AM · Restricted Project

Fri, Mar 15

nikic abandoned D54471: [SelectionDAG] Support differing src and dst alignments for memcpy/memmove.

Unlikely that I'll try to push this one through.

Fri, Mar 15, 3:19 PM · Restricted Project
nikic updated the diff for D59174: [DAGCombine] Fold (x & ~y) | y patterns.

Remove AArch64 specific portion, which has been handled by rL356299.

Fri, Mar 15, 2:27 PM · Restricted Project
nikic committed rG1a26144ff5a9: [AArch64] Turn BIC immediate creation into a DAG combine (authored by nikic).
[AArch64] Turn BIC immediate creation into a DAG combine
Fri, Mar 15, 2:04 PM
nikic committed rL356299: [AArch64] Turn BIC immediate creation into a DAG combine.
[AArch64] Turn BIC immediate creation into a DAG combine
Fri, Mar 15, 2:03 PM
nikic closed D59187: [AArch64] Turn BIC creation into a DAG combine.
Fri, Mar 15, 2:03 PM · Restricted Project
nikic updated the diff for D59187: [AArch64] Turn BIC creation into a DAG combine.

Fix typo in comment.

Fri, Mar 15, 12:46 PM · Restricted Project