Page MenuHomePhabricator

nikic (Nikita Popov)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Yesterday

nikic added inline comments to rL361166: [SDAG] Vector op legalization for overflow ops.
Mon, May 20, 11:25 PM
nikic committed rGe44691bf9f48: Move thumbv7k test from AArch64 to ARM (authored by nikic).
Move thumbv7k test from AArch64 to ARM
Mon, May 20, 11:23 PM
nikic committed rL361220: Move thumbv7k test from AArch64 to ARM.
Move thumbv7k test from AArch64 to ARM
Mon, May 20, 11:22 PM
nikic updated the diff for D60935: [IndVarSimplify] Fixup nowrap flags during LFTR when moving to post-inc (PR31181).

Handle pre-increment case as well, improve comment, rebase over additional tests.

Mon, May 20, 2:08 PM · Restricted Project
nikic committed rGe1d38ec8110e: [LFTR] Add additional PR31181 test cases (authored by nikic).
[LFTR] Add additional PR31181 test cases
Mon, May 20, 12:11 PM
nikic committed rL361189: [LFTR] Add additional PR31181 test cases.
[LFTR] Add additional PR31181 test cases
Mon, May 20, 12:10 PM
nikic committed rG9060b6df9703: [SDAG] Vector op legalization for overflow ops (authored by nikic).
[SDAG] Vector op legalization for overflow ops
Mon, May 20, 9:10 AM
nikic committed rL361166: [SDAG] Vector op legalization for overflow ops.
[SDAG] Vector op legalization for overflow ops
Mon, May 20, 9:09 AM
nikic closed D61692: [SDAG] Vector op legalization for overflow ops.
Mon, May 20, 9:09 AM · Restricted Project

Sun, May 19

nikic accepted D60260: Match types of accumulator and result for llvm.experimental.vector.reduce.fadd/fmul.

LG

Sun, May 19, 1:01 PM · Restricted Project

Wed, May 15

nikic added a comment to D61409: [SimplifyCFG] Added condition assumption for unreachable blocks.

Just to be clear, I didn't mean to say that we shouldn't do this, just that it is not guaranteed to be a win in the end. If it's possible to do some end-to-end performance testing with this patch to make sure that it doesn't come with unexpected regressions, I see no reason not to move forward with this change. The problem with assumes is a long-standing one and I don't think it has any simple solution.

Wed, May 15, 2:08 PM · Restricted Project
nikic accepted D61691: [InstSimplify] fold fcmp (minnum, X, C1), C2.

LGTM. In the future, it might be nice to generalize this as a getConstFloatRange() function (that would be [-INF, C] for minnum and [C, INF] for maxnum) and fold the comparison based on that.

Wed, May 15, 7:51 AM · Restricted Project
nikic added a comment to D60935: [IndVarSimplify] Fixup nowrap flags during LFTR when moving to post-inc (PR31181).

Reading through the discussion, it sounds like the only place where LFTR goes wrong is dealing with the post-increment form of the IV right?

If so, what about splitting LFTR into two parts. The first part does LFTR *without changing pre-to-post or vice versa*, and then a second part which converts to post-increment where possible. The value of the later seems quite questionable to me honestly, and if we have to restrict it greatly it wouldn't matter as much as having to restrict the first part. I'd also really like to be able to extend the first part to multiple exit loops whereas extending the second part seems actively harmful on some examples.

Wed, May 15, 1:08 AM · Restricted Project

Tue, May 14

nikic committed rG48c4e4fa802b: [LVI][CVP] Add support for abs/nabs select pattern flavor (authored by nikic).
[LVI][CVP] Add support for abs/nabs select pattern flavor
Tue, May 14, 11:53 AM
nikic committed rL360700: [LVI][CVP] Add support for abs/nabs select pattern flavor.
[LVI][CVP] Add support for abs/nabs select pattern flavor
Tue, May 14, 11:51 AM
nikic closed D61794: [LVI][CVP] Add support for abs/nabs select pattern flavor.
Tue, May 14, 11:51 AM · Restricted Project
nikic added inline comments to D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything.
Tue, May 14, 12:33 AM · Restricted Project

Mon, May 13

nikic requested changes to D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything.

A few last issues...

Mon, May 13, 12:58 PM · Restricted Project
nikic committed rG323dc634b984: [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel… (authored by nikic).
[WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel…
Mon, May 13, 12:39 PM
nikic committed rL360616: [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel….
[WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel…
Mon, May 13, 12:37 PM
nikic closed D61823: [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841).
Mon, May 13, 12:37 PM · Restricted Project
nikic updated the diff for D61823: [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841).

Add -asm-verbose=false, move CHECK lines, remove tabs.

Mon, May 13, 12:41 AM · Restricted Project

Sat, May 11

nikic created D61823: [WebAssembly] Don't assume that zext/sext result is i32/i64 in fast isel (PR41841).
Sat, May 11, 4:46 AM · Restricted Project
nikic added a comment to D59356: [SelectionDAGBuilder] Use accumulator value in VECREDUCE_FADD/FMUL.

This one can probably be abandoned in favor of D60261?

Sat, May 11, 1:50 AM
nikic requested changes to D59188: [DAGCombine] Fold insert_subvector(bitcast(x),bitcast(y)) -> bitcast(insert_subvector(x,y)).

Reverse ping. Apart from the previous comment this looks good, and I saw you already added some tests for that as well :)

Sat, May 11, 1:48 AM · Restricted Project
nikic added a comment to D61238: [ConstantRange] Add sdiv() support.

Add the last missing binary op to ConstantRange: sdiv.

Sat, May 11, 1:39 AM · Restricted Project
nikic added a comment to D60261: [Option A] Change semantics of fadd/fmul vector reductions..

Rereading the ML discussion just now, it looks like the consensus is to go with this option. Move forward?

Sat, May 11, 1:39 AM
nikic requested changes to D60260: Match types of accumulator and result for llvm.experimental.vector.reduce.fadd/fmul.

This looks good, but please also update existing tests that specify three types in the intrinstic name. Here's ones I found:

Sat, May 11, 1:14 AM · Restricted Project

Fri, May 10

nikic updated the diff for D61692: [SDAG] Vector op legalization for overflow ops.

Rebase over D61744.

Fri, May 10, 1:45 PM · Restricted Project
nikic committed rG9f7537bd4866: [SDAG] Recursively legalize both vector mulo results (authored by nikic).
[SDAG] Recursively legalize both vector mulo results
Fri, May 10, 1:41 PM
nikic committed rL360470: [SDAG] Recursively legalize both vector mulo results.
[SDAG] Recursively legalize both vector mulo results
Fri, May 10, 1:40 PM
nikic closed D61744: [SDAG] Recursively legalize both vector mulo results.
Fri, May 10, 1:40 PM · Restricted Project
nikic abandoned D59668: [ValueTracking] Take signedness into account for and/or ranges.

I'm going to drop this for now -- the original motivation here went away with the signed intersection support. These changes still make sense to improve icmp instsimplify, but are also not super valuable in that instcombine can handle it.

Fri, May 10, 1:26 PM · Restricted Project
nikic requested changes to D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything.

Still needs some duplicates CHECKs removed, per comments above.

Fri, May 10, 1:22 PM · Restricted Project
nikic added a comment to D60656: [LVI][CVP] Calculate with.overflow result range.

@spatel What do you think about going for the following abstraction instead? What I have in mind here is to make this also reusable for operations other than binaryOp(), such as uadd_sat() and friends.

Fri, May 10, 1:18 PM · Restricted Project
nikic committed rGe99486dc111a: [CVP] Add tests for urem, sdiv, srem ranges; NFC (authored by nikic).
[CVP] Add tests for urem, sdiv, srem ranges; NFC
Fri, May 10, 12:36 PM
nikic committed rL360460: [CVP] Add tests for urem, sdiv, srem ranges; NFC.
[CVP] Add tests for urem, sdiv, srem ranges; NFC
Fri, May 10, 12:35 PM
nikic created D61794: [LVI][CVP] Add support for abs/nabs select pattern flavor.
Fri, May 10, 10:43 AM · Restricted Project
nikic committed rGd74b87150448: [CVP] Add tests for abs and nabs spf; NFC (authored by nikic).
[CVP] Add tests for abs and nabs spf; NFC
Fri, May 10, 10:38 AM
nikic committed rL360445: [CVP] Add tests for abs and nabs spf; NFC.
[CVP] Add tests for abs and nabs spf; NFC
Fri, May 10, 10:38 AM

Thu, May 9

nikic added a comment to D60846: [ValueTracking] Improve isKnowNonZero for Ints.

Here's a slightly cleaned up version of the reproducer:

Thu, May 9, 1:53 PM · Restricted Project
nikic added a comment to D61744: [SDAG] Recursively legalize both vector mulo results.

Vector op legalization will automatically recursively legalize the returned SDValue, but we need to take care of the other results ourselves.

Thu, May 9, 11:01 AM · Restricted Project
nikic created D61744: [SDAG] Recursively legalize both vector mulo results.
Thu, May 9, 10:15 AM · Restricted Project

Wed, May 8

nikic added a comment to D60846: [ValueTracking] Improve isKnowNonZero for Ints.

@uabelho Thanks for the reproducer. I think the problems is that when we thread a comparison over a phi in instsimplify, we retain the original context instruction, while (I think) we should be using the terminator of the incoming value as context.

Wed, May 8, 1:50 PM · Restricted Project
nikic created D61692: [SDAG] Vector op legalization for overflow ops.
Wed, May 8, 12:17 PM · Restricted Project
nikic added a comment to D57348: [CodeGen][X86] Don't scalarize vector saturating add/sub.

@aemerson Thanks for the report! From a quick look, looks like the usubsat expands to usubo, which is then expanded during op legalization, while it needs to be expanded during vector op legalization. We're doing that for umulo and smulo, but apparently not for uaddo/saddo and usubo/ssubo. I'll prepare a patch.

Wed, May 8, 10:57 AM · Restricted Project
nikic committed rG9fd02a71a39b: Revert "[ValueTracking] Improve isKnowNonZero for Ints" (authored by nikic).
Revert "[ValueTracking] Improve isKnowNonZero for Ints"
Wed, May 8, 7:53 AM
nikic added a reverting change for rG3b137a495686: [ValueTracking] Improve isKnowNonZero for Ints: rG9fd02a71a39b: Revert "[ValueTracking] Improve isKnowNonZero for Ints".
Wed, May 8, 7:53 AM
nikic reopened D60846: [ValueTracking] Improve isKnowNonZero for Ints.
Wed, May 8, 7:52 AM · Restricted Project
nikic added a comment to D60846: [ValueTracking] Improve isKnowNonZero for Ints.

I've reverted this change for now (rL360260).

Wed, May 8, 7:52 AM · Restricted Project
nikic committed rL360260: Revert "[ValueTracking] Improve isKnowNonZero for Ints".
Revert "[ValueTracking] Improve isKnowNonZero for Ints"
Wed, May 8, 7:47 AM

Tue, May 7

nikic created D61653: [ConstantRange] Add makeAllowedNoWrapRegion().
Tue, May 7, 1:44 PM · Restricted Project
nikic committed rGf610110f1ac1: [ConstantRange] Simplify makeGNWR implementation; NFC (authored by nikic).
[ConstantRange] Simplify makeGNWR implementation; NFC
Tue, May 7, 1:33 PM
nikic committed rL360189: [ConstantRange] Simplify makeGNWR implementation; NFC.
[ConstantRange] Simplify makeGNWR implementation; NFC
Tue, May 7, 1:32 PM

Mon, May 6

nikic abandoned D59749: [ConstantRange] Fix isWrappedSet().

Abandoning this one, don't think there's anything worthwhile left here.

Mon, May 6, 10:57 AM · Restricted Project
nikic added inline comments to D61207: [ConstantRange] Add srem() support.
Mon, May 6, 10:43 AM · Restricted Project
nikic committed rGd5a403fb80c6: [ConstantRange] Add srem() support (authored by nikic).
[ConstantRange] Add srem() support
Mon, May 6, 10:00 AM
nikic committed rL360055: [ConstantRange] Add srem() support.
[ConstantRange] Add srem() support
Mon, May 6, 10:00 AM
nikic closed D61207: [ConstantRange] Add srem() support.
Mon, May 6, 10:00 AM · Restricted Project
nikic committed rGcfe786a19567: [SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635) (authored by nikic).
[SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635)
Mon, May 6, 9:16 AM
nikic committed rL360054: [SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635).
[SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635)
Mon, May 6, 9:15 AM
nikic closed D61398: [SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635).
Mon, May 6, 9:15 AM · Restricted Project
nikic added inline comments to D60935: [IndVarSimplify] Fixup nowrap flags during LFTR when moving to post-inc (PR31181).
Mon, May 6, 8:38 AM · Restricted Project
nikic updated the diff for D60935: [IndVarSimplify] Fixup nowrap flags during LFTR when moving to post-inc (PR31181).

Use both pre-inc and post-inc AddRec nowrap flags.

Mon, May 6, 8:33 AM · Restricted Project

Sat, May 4

nikic accepted D60846: [ValueTracking] Improve isKnowNonZero for Ints.

LGTM

Sat, May 4, 4:44 AM · Restricted Project

Thu, May 2

nikic added a comment to D61409: [SimplifyCFG] Added condition assumption for unreachable blocks.

This is a good idea in theory, but I'm somewhat concerned that this will backfire in practice because assumes often pessimize optimization. For example LLVM has a really bad offender where it inserts assumes for alignment annotations during inlining -- thankfully there's an option to disable it, because it's a major perf regression otherwise.

Pessimization of the final produced code, or of the llvm itself?

Thu, May 2, 1:00 AM · Restricted Project
nikic added a comment to D61409: [SimplifyCFG] Added condition assumption for unreachable blocks.

This is a good idea in theory, but I'm somewhat concerned that this will backfire in practice because assumes often pessimize optimization. For example LLVM has a really bad offender where it inserts assumes for alignment annotations during inlining -- thankfully there's an option to disable it, because it's a major perf regression otherwise.

Thu, May 2, 12:44 AM · Restricted Project

Wed, May 1

nikic added a comment to D61400: [SelectionDAG] Utilize ARM shift behavior.

I suspect that it's not safe to do this in this form: While the shift instruction on the target might be well defined, this is still operating on ISD opcodes that consider out-of-bounds shifts to be undef. After you have eliminated the check, some other combine could come along and optimize the shift to undef based on that.

Wed, May 1, 2:14 PM · Restricted Project
nikic created D61398: [SDAG][AArch64] Boolean and/or reduce to umax/min reduce (PR41635).
Wed, May 1, 1:32 PM · Restricted Project
nikic committed rGc89667db2c6b: [AArch64] Add tests for bool vector reductions; NFC (authored by nikic).
[AArch64] Add tests for bool vector reductions; NFC
Wed, May 1, 1:17 PM
nikic committed rL359723: [AArch64] Add tests for bool vector reductions; NFC.
[AArch64] Add tests for bool vector reductions; NFC
Wed, May 1, 1:16 PM
nikic added a comment to D60935: [IndVarSimplify] Fixup nowrap flags during LFTR when moving to post-inc (PR31181).

ping

Wed, May 1, 1:51 AM · Restricted Project

Mon, Apr 29

nikic added a comment to D60846: [ValueTracking] Improve isKnowNonZero for Ints.

test/Transforms/LICM/hoist-mustexec.ll still needs to be updated. (Should probably generate full checks as a preliminary NFC commit first.)

Oops - I forgot that even though I mentioned it in the earlier comment. Yes, that must be included in this patch (and any other existing tests that are known to be affected).

Sorry, I forgot all about this as well. I did run the update_test_checks script on this file after applying the patch and there was not improvement to the generated code.

Mon, Apr 29, 12:28 AM · Restricted Project

Sun, Apr 28

nikic added a comment to D60846: [ValueTracking] Improve isKnowNonZero for Ints.

Transforms/LICM/hoist-mustexec.ll still needs to be updated.

Sun, Apr 28, 8:49 AM · Restricted Project
nikic added inline comments to D60960: [ConstantRange] Add makeExactNoWrapRegion().
Sun, Apr 28, 8:42 AM · Restricted Project
nikic committed rG7a94795b2b7f: [ConstantRange] Add makeExactNoWrapRegion() (authored by nikic).
[ConstantRange] Add makeExactNoWrapRegion()
Sun, Apr 28, 8:39 AM
nikic committed rL359402: [ConstantRange] Add makeExactNoWrapRegion().
[ConstantRange] Add makeExactNoWrapRegion()
Sun, Apr 28, 8:39 AM
nikic closed D60960: [ConstantRange] Add makeExactNoWrapRegion().
Sun, Apr 28, 8:39 AM · Restricted Project
nikic created D61238: [ConstantRange] Add sdiv() support.
Sun, Apr 28, 3:41 AM · Restricted Project
nikic added inline comments to D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything.
Sun, Apr 28, 2:13 AM · Restricted Project

Sat, Apr 27

nikic added inline comments to D61207: [ConstantRange] Add srem() support.
Sat, Apr 27, 1:41 AM · Restricted Project

Fri, Apr 26

nikic created D61207: [ConstantRange] Add srem() support.
Fri, Apr 26, 12:06 PM · Restricted Project
nikic added inline comments to D61151: [SimpligyCFG] NFC, remove GCD that was only used for powers of two.
Fri, Apr 26, 10:29 AM · Restricted Project
nikic added a parent revision for D61160: [SimplifyCFG] Implement the suggested ctlz transform: D61159: [SimplifyCFG] Run ReduceSwitchRange unconditionally, generalize.
Fri, Apr 26, 10:21 AM · Restricted Project
nikic added a child revision for D61159: [SimplifyCFG] Run ReduceSwitchRange unconditionally, generalize: D61160: [SimplifyCFG] Implement the suggested ctlz transform.
Fri, Apr 26, 10:21 AM · Restricted Project
nikic committed rGc0fa4ec01dd1: [ConstantRange] Add abs() support (authored by nikic).
[ConstantRange] Add abs() support
Fri, Apr 26, 9:52 AM
nikic committed rL359321: [ConstantRange] Add abs() support.
[ConstantRange] Add abs() support
Fri, Apr 26, 9:52 AM
nikic closed D61084: [ConstantRange] Add abs() support.
Fri, Apr 26, 9:52 AM · Restricted Project
nikic added a comment to D61160: [SimplifyCFG] Implement the suggested ctlz transform.

Can you please point to patch 5? I think it's missing. (Best directly add it as a parent revision.)

Fri, Apr 26, 12:32 AM · Restricted Project
nikic added a parent revision for D61159: [SimplifyCFG] Run ReduceSwitchRange unconditionally, generalize: D61158: [SimplifyCFG] use fshr instead of shl/lshr/or.
Fri, Apr 26, 12:31 AM · Restricted Project
nikic added a child revision for D61158: [SimplifyCFG] use fshr instead of shl/lshr/or: D61159: [SimplifyCFG] Run ReduceSwitchRange unconditionally, generalize.
Fri, Apr 26, 12:31 AM · Restricted Project
nikic added a reviewer for D61158: [SimplifyCFG] use fshr instead of shl/lshr/or: spatel.

As far as I know we don't have any known issues in funnel shift optimization or codegen. We should check with @spatel though.

Fri, Apr 26, 12:31 AM · Restricted Project
nikic added a child revision for D61151: [SimpligyCFG] NFC, remove GCD that was only used for powers of two: D61158: [SimplifyCFG] use fshr instead of shl/lshr/or.
Fri, Apr 26, 12:25 AM · Restricted Project
nikic added a parent revision for D61158: [SimplifyCFG] use fshr instead of shl/lshr/or: D61151: [SimpligyCFG] NFC, remove GCD that was only used for powers of two.
Fri, Apr 26, 12:25 AM · Restricted Project
nikic added inline comments to D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything.
Fri, Apr 26, 12:25 AM · Restricted Project
nikic added a child revision for D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything: D61151: [SimpligyCFG] NFC, remove GCD that was only used for powers of two.
Fri, Apr 26, 12:25 AM · Restricted Project
nikic added a parent revision for D61151: [SimpligyCFG] NFC, remove GCD that was only used for powers of two: D61150: [SimplifyCFG] NFC, update Switch tests to HEAD so I can see if my changes change anything.
Fri, Apr 26, 12:25 AM · Restricted Project

Thu, Apr 25

nikic added inline comments to D60982: [SimplifyCFG] Use lookup tables when they are more space efficient or a huge speed win..
Thu, Apr 25, 12:19 PM · Restricted Project
nikic added inline comments to D60932: [NFC] Add baseline tests for int isKnownNonZero.
Thu, Apr 25, 12:05 AM · Restricted Project

Wed, Apr 24

nikic added inline comments to D60932: [NFC] Add baseline tests for int isKnownNonZero.
Wed, Apr 24, 11:50 PM · Restricted Project