Page MenuHomePhabricator

spatel (Sanjay Patel)
User

Projects

User does not belong to any projects.

User Details

User Since
May 22 2014, 1:24 PM (273 w, 5 d)

Recent Activity

Today

spatel committed rGd5035727ad2c: [InstCombine] add more extra use tests for icmp with extends; NFC (authored by spatel).
[InstCombine] add more extra use tests for icmp with extends; NFC
Tue, Aug 20, 2:24 PM
spatel committed rL369447: [InstCombine] add more extra use tests for icmp with extends; NFC.
[InstCombine] add more extra use tests for icmp with extends; NFC
Tue, Aug 20, 2:22 PM
spatel committed rG48e81e8e10ed: [InstCombine] add tests for mismatched cast ops for icmp; NFC (authored by spatel).
[InstCombine] add tests for mismatched cast ops for icmp; NFC
Tue, Aug 20, 1:53 PM
spatel committed rL369439: [InstCombine] add tests for mismatched cast ops for icmp; NFC.
[InstCombine] add tests for mismatched cast ops for icmp; NFC
Tue, Aug 20, 1:52 PM
spatel committed rG292b1087f408: [InstCombine] add helper function for icmp+zext/sext; NFC (authored by spatel).
[InstCombine] add helper function for icmp+zext/sext; NFC
Tue, Aug 20, 11:17 AM
spatel committed rL369421: [InstCombine] add helper function for icmp+zext/sext; NFC.
[InstCombine] add helper function for icmp+zext/sext; NFC
Tue, Aug 20, 11:17 AM
spatel committed rG2e68e4d60e9f: [InstCombine] make fold for icmp with sext more efficient; NFC (authored by spatel).
[InstCombine] make fold for icmp with sext more efficient; NFC
Tue, Aug 20, 10:07 AM
spatel committed rL369411: [InstCombine] make fold for icmp with sext more efficient; NFC.
[InstCombine] make fold for icmp with sext more efficient; NFC
Tue, Aug 20, 10:07 AM
spatel committed rGa90ee0eeb6ab: [InstCombine] improve readability for icmp with cast folds; NFC (authored by spatel).
[InstCombine] improve readability for icmp with cast folds; NFC
Tue, Aug 20, 7:57 AM
spatel committed rL369390: [InstCombine] improve readability for icmp with cast folds; NFC.
[InstCombine] improve readability for icmp with cast folds; NFC
Tue, Aug 20, 7:57 AM
spatel committed rGf99d254aaec7: [InstCombine] simplify min/max of min/max with same operands (PR35607) (authored by spatel).
[InstCombine] simplify min/max of min/max with same operands (PR35607)
Tue, Aug 20, 6:43 AM
spatel committed rL369386: [InstCombine] simplify min/max of min/max with same operands (PR35607).
[InstCombine] simplify min/max of min/max with same operands (PR35607)
Tue, Aug 20, 6:43 AM
spatel committed rGeb2211b35239: [InstCombine] add tests for min/max with min/max of same operands; NFC (authored by spatel).
[InstCombine] add tests for min/max with min/max of same operands; NFC
Tue, Aug 20, 5:50 AM
spatel committed rL369376: [InstCombine] add tests for min/max with min/max of same operands; NFC.
[InstCombine] add tests for min/max with min/max of same operands; NFC
Tue, Aug 20, 5:50 AM

Yesterday

spatel added a comment to D66416: [SLP] allow non-power-of-2 vectorization.

There is more complex D57059 to support non-power-of-2 vectorization. It should be split into several small patches + it must be very carefully tested, I just don't have time to work on this. I have a patch for this updated to the latest version, it would be good if somebody else could take it, split it, etc.

Mon, Aug 19, 6:33 AM · Restricted Project
spatel created D66416: [SLP] allow non-power-of-2 vectorization.
Mon, Aug 19, 6:12 AM · Restricted Project
spatel committed rG0f9b5f86f1cd: [SLP] add test that requires shuffle of scalars; NFC (authored by spatel).
[SLP] add test that requires shuffle of scalars; NFC
Mon, Aug 19, 5:41 AM
spatel committed rL369255: [SLP] add test that requires shuffle of scalars; NFC.
[SLP] add test that requires shuffle of scalars; NFC
Mon, Aug 19, 5:40 AM
spatel committed rGb38bac3699d6: [SLP] reduce duplicated code; NFC (authored by spatel).
[SLP] reduce duplicated code; NFC
Mon, Aug 19, 4:40 AM
spatel committed rL369250: [SLP] reduce duplicated code; NFC.
[SLP] reduce duplicated code; NFC
Mon, Aug 19, 4:39 AM
spatel added inline comments to D57779: [SLP] Add support for throttling..
Mon, Aug 19, 4:30 AM

Sun, Aug 18

spatel accepted D66366: [CGP] Remove ModifiedDT from the makeBitReverse loop.

LGTM

Sun, Aug 18, 1:13 PM · Restricted Project

Fri, Aug 16

spatel committed rGa53ad0e157d1: Revert r367891 - "[InstCombine] combine mul+shl separated by zext" (authored by spatel).
Revert r367891 - "[InstCombine] combine mul+shl separated by zext"
Fri, Aug 16, 4:38 PM
spatel added a reverting change for rG5dbb90bfe14a: [InstCombine] combine mul+shl separated by zext: rGa53ad0e157d1: Revert r367891 - "[InstCombine] combine mul+shl separated by zext".
Fri, Aug 16, 4:38 PM
spatel committed rL369174: Revert r367891 - "[InstCombine] combine mul+shl separated by zext".
Revert r367891 - "[InstCombine] combine mul+shl separated by zext"
Fri, Aug 16, 4:35 PM
spatel committed rGacceedb15f52: [CodeGenPrepare] Fix use-after-free (authored by spatel).
[CodeGenPrepare] Fix use-after-free
Fri, Aug 16, 4:13 PM
spatel committed rL369168: [CodeGenPrepare] Fix use-after-free.
[CodeGenPrepare] Fix use-after-free
Fri, Aug 16, 4:13 PM
spatel closed D66330: Fix use-after-free in CodeGenPrepare.
Fri, Aug 16, 4:13 PM · Restricted Project
spatel committed rG8341a847a228: [CodeGenPrepare] fix RUN line settings (authored by spatel).
[CodeGenPrepare] fix RUN line settings
Fri, Aug 16, 2:41 PM
spatel committed rL369156: [CodeGenPrepare] fix RUN line settings.
[CodeGenPrepare] fix RUN line settings
Fri, Aug 16, 2:41 PM
spatel committed rG39eb2324f7ec: [InstCombine] canonicalize a scalar-select-of-vectors to vector select (authored by spatel).
[InstCombine] canonicalize a scalar-select-of-vectors to vector select
Fri, Aug 16, 11:52 AM
spatel committed rL369140: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.
[InstCombine] canonicalize a scalar-select-of-vectors to vector select
Fri, Aug 16, 11:50 AM
spatel closed D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.
Fri, Aug 16, 11:50 AM · Restricted Project
spatel committed rG144903310f58: [SLP] add tests for PR16739; NFC (authored by spatel).
[SLP] add tests for PR16739; NFC
Fri, Aug 16, 10:03 AM
spatel committed rL369127: [SLP] add tests for PR16739; NFC.
[SLP] add tests for PR16739; NFC
Fri, Aug 16, 10:02 AM
spatel added a reviewer for D66338: [CGP] Drop no op intrinsic calls: hfinkel.
Fri, Aug 16, 8:20 AM · Restricted Project
spatel accepted D66330: Fix use-after-free in CodeGenPrepare.

LGTM - in D63233, I added a TODO that I've marked here for reference, but this appears to be a minimal/safe fix.

Fri, Aug 16, 7:44 AM · Restricted Project
spatel accepted D66057: [InstCombine] Shift amount reassociation in bittest: trunc-of-shl (PR42399).

LGTM

Fri, Aug 16, 7:02 AM · Restricted Project
spatel committed rG5dcec7ce7ae6: [x86] fix fdiv test; NFC (authored by spatel).
[x86] fix fdiv test; NFC
Fri, Aug 16, 6:33 AM
spatel committed rL369107: [x86] fix fdiv test; NFC.
[x86] fix fdiv test; NFC
Fri, Aug 16, 6:32 AM
spatel added a comment to D66050: Improve division estimation of floating points..

@qiucf - please rebase and update for test changes after rL369106.

Fri, Aug 16, 6:32 AM · Restricted Project
spatel added a comment to D66050: Improve division estimation of floating points..

@qiucf - please rebase and update for test changes after rL369106.

Fri, Aug 16, 6:26 AM · Restricted Project
spatel committed rG15fb2a73f9a0: [x86] add tests for fdiv with variable operands; NFC (authored by spatel).
[x86] add tests for fdiv with variable operands; NFC
Fri, Aug 16, 6:24 AM
spatel committed rL369106: [x86] add tests for fdiv with variable operands; NFC.
[x86] add tests for fdiv with variable operands; NFC
Fri, Aug 16, 6:24 AM
spatel added reviewers for D66050: Improve division estimation of floating points.: RKSimon, andreadb, craig.topper.
Fri, Aug 16, 5:49 AM · Restricted Project

Thu, Aug 15

spatel added inline comments to D66057: [InstCombine] Shift amount reassociation in bittest: trunc-of-shl (PR42399).
Thu, Aug 15, 3:00 PM · Restricted Project
spatel added inline comments to D66057: [InstCombine] Shift amount reassociation in bittest: trunc-of-shl (PR42399).
Thu, Aug 15, 9:56 AM · Restricted Project
spatel added a comment to D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.

What about very long vectors that do no fit into single register? Is it cost effective for such vectors too?

We would split the long vectors into values that fit the target registers in the backend. At that point, the target can decide if N vector selects are better or worse than a transfer to scalar compare and branch. As @lebedev.ri mentioned, we're missing that logic in SDAG, but given that this transform produces the better code for the default case, I don't think we need to make this patch dependent on backend fixups.

But it adds extra cost for vectors splitting. Maybe limit the size of the vectors in the patch?

How would we do that? This is canonicalization, so we are not using any target-dependent information here. Presumably, whoever or whatever created the illegal vectors in the first place knows that codegen will have to alter the those ops to create legal code, so that will be handled by a pass that has a cost model.

It means that you can make a transformation that may be less cost-effective than the original code.

Thu, Aug 15, 8:30 AM · Restricted Project
spatel added a comment to D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.

What about very long vectors that do no fit into single register? Is it cost effective for such vectors too?

We would split the long vectors into values that fit the target registers in the backend. At that point, the target can decide if N vector selects are better or worse than a transfer to scalar compare and branch. As @lebedev.ri mentioned, we're missing that logic in SDAG, but given that this transform produces the better code for the default case, I don't think we need to make this patch dependent on backend fixups.

But it adds extra cost for vectors splitting. Maybe limit the size of the vectors in the patch?

Thu, Aug 15, 8:18 AM · Restricted Project
spatel added a comment to D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.

What about very long vectors that do no fit into single register? Is it cost effective for such vectors too?

Thu, Aug 15, 8:01 AM · Restricted Project
spatel updated subscribers of D61675: [WIP] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator.

Not sure if clang / C source has any impact on their targets, but subscribing @mcberg2017 @escha in case this could make a difference for out-of-tree (GPU) hardware.

Thu, Aug 15, 7:07 AM · Restricted Project
spatel committed rG57d459309dbb: [SDAG][x86] check for relaxed math when matching an FP reduction (authored by spatel).
[SDAG][x86] check for relaxed math when matching an FP reduction
Thu, Aug 15, 5:47 AM
spatel committed rL368995: [SDAG][x86] check for relaxed math when matching an FP reduction.
[SDAG][x86] check for relaxed math when matching an FP reduction
Thu, Aug 15, 5:42 AM
spatel closed D66236: [SDAG][x86] check for relaxed math when matching an FP reduction.
Thu, Aug 15, 5:42 AM · Restricted Project

Wed, Aug 14

spatel updated the diff for D66236: [SDAG][x86] check for relaxed math when matching an FP reduction.

Patch updated:

  1. Switch flag requirements based on opcode (only FADD handled for now).
  2. Added partial reduction tests (rL368913).
  3. Added negative test for mismatch on fast-math-flags.
Wed, Aug 14, 1:57 PM · Restricted Project
spatel added inline comments to D66236: [SDAG][x86] check for relaxed math when matching an FP reduction.
Wed, Aug 14, 1:49 PM · Restricted Project
spatel committed rGa8ba919c01df: [x86] add tests for fadd reduction; NFC (authored by spatel).
[x86] add tests for fadd reduction; NFC
Wed, Aug 14, 1:22 PM
spatel committed rL368913: [x86] add tests for fadd reduction; NFC.
[x86] add tests for fadd reduction; NFC
Wed, Aug 14, 1:22 PM
spatel committed rGecccf29e6c79: [SDAG] move variable closer to use; NFC (authored by spatel).
[SDAG] move variable closer to use; NFC
Wed, Aug 14, 12:46 PM
spatel committed rL368905: [SDAG] move variable closer to use; NFC.
[SDAG] move variable closer to use; NFC
Wed, Aug 14, 12:46 PM
spatel added inline comments to D66236: [SDAG][x86] check for relaxed math when matching an FP reduction.
Wed, Aug 14, 12:33 PM · Restricted Project
spatel created D66236: [SDAG][x86] check for relaxed math when matching an FP reduction.
Wed, Aug 14, 11:50 AM · Restricted Project
spatel updated subscribers of D66050: Improve division estimation of floating points..

x86 is moving away from reciprocal estimate code because recent hardware implements a real fdiv at about the same speed as reciprocal estimate+refinement. So x86 perf probably isn't that big of a concern, but it would be good to see the regression test diffs (use the auto-generation script to update those files).

Wed, Aug 14, 7:16 AM · Restricted Project

Tue, Aug 13

spatel added a comment to D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.

I'm honestly not sure here if i would consider splat-of-i1 or i1 more canonical,
i would kind-of guessed i1 since it is a single bit while vector isn't.

Tue, Aug 13, 10:34 AM · Restricted Project
spatel added reviewers for D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select: efriedma, lebedev.ri, nikic.
Tue, Aug 13, 9:16 AM · Restricted Project
spatel accepted D65765: [InstCombine] Non-canonical clamp-like pattern handling.

LGTM

Tue, Aug 13, 5:17 AM · Restricted Project
spatel accepted D65530: [InstCombine] foldXorOfICmps(): don't give up on non-single-use ICmp's if all users are freely invertible.

LGTM

Tue, Aug 13, 5:16 AM · Restricted Project

Mon, Aug 12

spatel added a comment to D65765: [InstCombine] Non-canonical clamp-like pattern handling.

Thanks for taking a look.

I'm not sure how to test uge/sge predicates - i can't come up with any pattern that still contains them after -instcombine.
https://godbolt.org/z/7EAcfy
I'm not sure if that is guaranteed (and thus i should just drop that handling), or i'm simply failing at test-case production.

Mon, Aug 12, 2:16 PM · Restricted Project
spatel added inline comments to D65765: [InstCombine] Non-canonical clamp-like pattern handling.
Mon, Aug 12, 1:40 PM · Restricted Project
spatel created D66095: [InstCombine] canonicalize a scalar-select-of-vectors to vector select.
Mon, Aug 12, 10:27 AM · Restricted Project
spatel added a comment to D65530: [InstCombine] foldXorOfICmps(): don't give up on non-single-use ICmp's if all users are freely invertible.

Make sure I didn't typo this translation, but I think I'm seeing extra instructions for vectors with this transform on x86 and aarch64:
...

Sure, but that is irrelevant. D65765 improves upon both of them:
https://godbolt.org/z/-UIddL

Mon, Aug 12, 10:11 AM · Restricted Project
spatel added a comment to D65530: [InstCombine] foldXorOfICmps(): don't give up on non-single-use ICmp's if all users are freely invertible.

Sorry for the delay in looking at this. What do the motivating examples look like for codegen? Are we getting the optimal codegen for these clamps, or would we better off trying to create min/max and/or saturating intrinsics?

Mon, Aug 12, 9:04 AM · Restricted Project
spatel committed rG24a9e86849ff: [InstCombine] add tests for scalar-select-of-vectors; NFC (authored by spatel).
[InstCombine] add tests for scalar-select-of-vectors; NFC
Mon, Aug 12, 8:22 AM
spatel committed rL368583: [InstCombine] add tests for scalar-select-of-vectors; NFC.
[InstCombine] add tests for scalar-select-of-vectors; NFC
Mon, Aug 12, 8:22 AM
spatel added a comment to D65898: [InstCombine] x /c fabs(x) -> copysign(1.0, x).

Thanks

Mon, Aug 12, 6:24 AM · Restricted Project
spatel accepted D65898: [InstCombine] x /c fabs(x) -> copysign(1.0, x).

LGTM

Mon, Aug 12, 6:16 AM · Restricted Project

Sat, Aug 10

spatel committed rG21c15ef38487: [Reassociate] try harder to convert negative FP constants to positive (authored by spatel).
[Reassociate] try harder to convert negative FP constants to positive
Sat, Aug 10, 6:18 AM
spatel committed rL368512: [Reassociate] try harder to convert negative FP constants to positive.
[Reassociate] try harder to convert negative FP constants to positive
Sat, Aug 10, 6:18 AM
spatel closed D65954: [Reassociate] try harder to convert negative FP constants to positive.
Sat, Aug 10, 6:18 AM · Restricted Project

Fri, Aug 9

spatel committed rG26b2c114515a: [DAGCombiner] exclude x*2.0 from normal negation profitability rules (authored by spatel).
[DAGCombiner] exclude x*2.0 from normal negation profitability rules
Fri, Aug 9, 2:38 PM
spatel committed rL368490: [DAGCombiner] exclude x*2.0 from normal negation profitability rules.
[DAGCombiner] exclude x*2.0 from normal negation profitability rules
Fri, Aug 9, 2:38 PM
spatel closed D66016: [DAGCombiner] exclude x*2.0 from normal negation profitability rules.
Fri, Aug 9, 2:38 PM · Restricted Project
spatel created D66016: [DAGCombiner] exclude x*2.0 from normal negation profitability rules.
Fri, Aug 9, 8:40 AM · Restricted Project
spatel updated subscribers of D65898: [InstCombine] x /c fabs(x) -> copysign(1.0, x).
Fri, Aug 9, 8:20 AM · Restricted Project
spatel committed rG69ab7a0e4552: [AArch64][x86] add tests for pessimization of expression with X*2.0 (PR32939)… (authored by spatel).
[AArch64][x86] add tests for pessimization of expression with X*2.0 (PR32939)…
Fri, Aug 9, 7:55 AM
spatel committed rL368445: [AArch64][x86] add tests for pessimization of expression with X*2.0 (PR32939)….
[AArch64][x86] add tests for pessimization of expression with X*2.0 (PR32939)…
Fri, Aug 9, 7:51 AM
spatel committed rG0b4ae34c2f34: [DAGCombiner] remove redundant fold for X*1.0; NFC (authored by spatel).
[DAGCombiner] remove redundant fold for X*1.0; NFC
Fri, Aug 9, 7:31 AM
spatel committed rL368443: [DAGCombiner] remove redundant fold for X*1.0; NFC.
[DAGCombiner] remove redundant fold for X*1.0; NFC
Fri, Aug 9, 7:30 AM
spatel accepted D65741: [X86][SSE] Lower shuffle as ANY_EXTEND_VECTOR_INREG.

LGTM

Fri, Aug 9, 7:02 AM · Restricted Project
spatel added inline comments to D65898: [InstCombine] x /c fabs(x) -> copysign(1.0, x).
Fri, Aug 9, 6:17 AM · Restricted Project
spatel committed rG991834a51616: [GlobalOpt] prevent crashing on large integer types (PR42932) (authored by spatel).
[GlobalOpt] prevent crashing on large integer types (PR42932)
Fri, Aug 9, 5:44 AM
spatel committed rL368437: [GlobalOpt] prevent crashing on large integer types (PR42932).
[GlobalOpt] prevent crashing on large integer types (PR42932)
Fri, Aug 9, 5:43 AM
spatel closed D65970: [GlobalOpt] prevent crashing on wide integer types (PR42932).
Fri, Aug 9, 5:43 AM · Restricted Project
spatel accepted D65522: [X86][SSE] Swap X86ISD::BLENDV inputs with an inverted selection mask (PR42825).

LGTM

Fri, Aug 9, 5:23 AM · Restricted Project

Thu, Aug 8

spatel accepted D65973: [InstSimplify] Report "Changed" also when only deleting dead instructions.

I stepped through this example, and wouldInstructionBeTriviallyDead() returns true because the call has neither uses nor side effects. So we mark it as dead, and then it gets deleted. I'm not sure if that explains the other bug reports mentioned in D65336 though.

Thu, Aug 8, 2:28 PM · Restricted Project
spatel created D65970: [GlobalOpt] prevent crashing on wide integer types (PR42932).
Thu, Aug 8, 1:43 PM · Restricted Project
spatel added a comment to D65954: [Reassociate] try harder to convert negative FP constants to positive.

We have some stir(some regressions - a few instructions here and there), however the change is overall beneficial for us.

LGTM.

Thu, Aug 8, 1:25 PM · Restricted Project
spatel updated the diff for D64142: [SLP] try to create vector loads from bitcasted scalar pointers.

Patch updated:

  1. Added documentation comment for vectorizeLoads().
  2. Use isSimple() to filter out 'volatile' and other loads that we don't want to alter.
  3. Moved vectorization of loads to end of processing per block (not sure if that answers the request for "end of vectorization" though).
  4. Removed check for load larger than vector register size (that was an attempt to not create something harmful, but now we are using the cost model).
Thu, Aug 8, 11:16 AM · Restricted Project
spatel accepted D65908: Support unary FNeg in LICM.

LGTM

Thu, Aug 8, 9:12 AM · Restricted Project
spatel accepted D65802: [DAGCombiner] Rebuild (setcc x, y, ==) from (xor (xor x, y), 1).

LGTM

Thu, Aug 8, 8:50 AM · Restricted Project