Page MenuHomePhabricator

chfast (Paweł Bylica)
User

Projects

User does not belong to any projects.

User Details

User Since
May 16 2014, 8:34 AM (430 w, 1 d)

Recent Activity

May 16 2022

chfast accepted D125642: [X86] Attempt to fold EFLAGS into X86ISD::ADD/SUB ops.

Looks very nice, thanks.

May 16 2022, 12:32 AM · Restricted Project, Restricted Project

Mar 14 2022

chfast added a comment to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

@chfast What happened to this patch? I was looking at https://llvm.org/PR36243 and wondering if it'd be worth AggressiveInstCombine/InstCombine doing something similar for adds (in that case a 3 chain add i32 to add i96).

Mar 14 2022, 11:40 AM · Restricted Project, Restricted Project
chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

On the high level note, using builtin_subc() or builtin_sub_with_overflow() is good enough workaround.

Mar 14 2022, 11:27 AM · Restricted Project, Restricted Project
chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

@chfast reverse-ping - any luck with working out how best to deal with add_U320_without_i128_add?

Mar 14 2022, 11:24 AM · Restricted Project, Restricted Project

Feb 25 2022

chfast committed rGeb1ff70fc5fc: [X86] Combine ADC(ADD(X,Y),0,Carry) -> ADC(X,Y,Carry) (authored by chfast).
[X86] Combine ADC(ADD(X,Y),0,Carry) -> ADC(X,Y,Carry)
Feb 25 2022, 5:32 AM
chfast closed D120435: [X86] Combine ADC(ADD(X,Y),0,Carry) -> ADC(X,Y,Carry).
Feb 25 2022, 5:31 AM · Restricted Project, Restricted Project

Feb 23 2022

chfast added inline comments to D120435: [X86] Combine ADC(ADD(X,Y),0,Carry) -> ADC(X,Y,Carry).
Feb 23 2022, 2:05 PM · Restricted Project, Restricted Project
chfast added inline comments to D118037: [DAGCombine] Consider SETULT as carry flag.
Feb 23 2022, 2:03 PM · Restricted Project, Restricted Project
chfast requested review of D120435: [X86] Combine ADC(ADD(X,Y),0,Carry) -> ADC(X,Y,Carry).
Feb 23 2022, 2:02 PM · Restricted Project, Restricted Project
chfast committed rGafdaa86b771f: [DAGCombine] Extend combineCarryDiamond() (authored by chfast).
[DAGCombine] Extend combineCarryDiamond()
Feb 23 2022, 12:39 PM
chfast closed D118362: [DAGCombine] Extend combineCarryDiamond().
Feb 23 2022, 12:38 PM · Restricted Project
chfast abandoned D22565: YAMLParser: report errors according to provided position.
Feb 23 2022, 10:28 AM

Feb 21 2022

chfast retitled D118362: [DAGCombine] Extend combineCarryDiamond() from [DAGCombine] Extend and refactor combineCarryDiamond() to [DAGCombine] Extend combineCarryDiamond().
Feb 21 2022, 12:46 PM · Restricted Project
chfast updated the diff for D118362: [DAGCombine] Extend combineCarryDiamond().

Rebased.

Feb 21 2022, 12:45 PM · Restricted Project
chfast committed rGdf0c16ce0062: [NFC][DAGCombine] Use isOperandOf() in combineCarryDiamond (authored by chfast).
[NFC][DAGCombine] Use isOperandOf() in combineCarryDiamond
Feb 21 2022, 12:42 PM
chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

This was intermediate change to solve https://github.com/llvm/llvm-project/issues/53432. There I want to merge sub + cmp into single sbb. Any suggestions how to solve it differently?

Feb 21 2022, 11:39 AM · Restricted Project, Restricted Project

Feb 16 2022

chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

Maybe perform this inside X86ISelLowering?

Feb 16 2022, 1:18 PM · Restricted Project, Restricted Project

Jan 28 2022

chfast added inline comments to D118362: [DAGCombine] Extend combineCarryDiamond().
Jan 28 2022, 1:03 PM · Restricted Project

Jan 27 2022

chfast requested review of D118362: [DAGCombine] Extend combineCarryDiamond().
Jan 27 2022, 6:35 AM · Restricted Project

Jan 26 2022

chfast abandoned D118035: [test][DAGCombine] Add tests for combining carry diamond. NFC.
Jan 26 2022, 3:33 PM · Restricted Project
chfast committed rGbdb7837481c2: [test][DAGCombine] Add more tests for carry diamond. NFC (authored by chfast).
[test][DAGCombine] Add more tests for carry diamond. NFC
Jan 26 2022, 3:27 PM
chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

What I try to do in the end is to fix https://github.com/llvm/llvm-project/issues/53432. Maybe this particular change is not good direction, but on the other hand it also helps with the test add_U320_without_i128_add already in repo.

Jan 26 2022, 3:21 PM · Restricted Project, Restricted Project
chfast added a reviewer for D118037: [DAGCombine] Consider SETULT as carry flag: lebedev.ri.

BTW - how come we still have the ISD::ADDE/SUBE nodes? I thought we were intending to get rid of them as the glue nodes made them difficult to work with.

Jan 26 2022, 7:19 AM · Restricted Project, Restricted Project
chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

Is ISD::SETULT documented as affecting carry flag?

Jan 26 2022, 5:16 AM · Restricted Project, Restricted Project
chfast added a reviewer for D118035: [test][DAGCombine] Add tests for combining carry diamond. NFC: xbolva00.
Jan 26 2022, 3:28 AM · Restricted Project

Jan 25 2022

chfast updated the diff for D118037: [DAGCombine] Consider SETULT as carry flag.

Use switch. Rebased.

Jan 25 2022, 2:51 PM · Restricted Project, Restricted Project
chfast committed rG8f5b1d9e1462: [test][DAGCombine] Add tests for cmp+add -> addcarry (authored by chfast).
[test][DAGCombine] Add tests for cmp+add -> addcarry
Jan 25 2022, 1:17 PM
chfast updated the summary of D118037: [DAGCombine] Consider SETULT as carry flag.
Jan 25 2022, 10:30 AM · Restricted Project, Restricted Project
chfast updated the diff for D118037: [DAGCombine] Consider SETULT as carry flag.

Address review comments.

Jan 25 2022, 10:29 AM · Restricted Project, Restricted Project
chfast added reviewers for D118035: [test][DAGCombine] Add tests for combining carry diamond. NFC: spatel, lebedev.ri.
Jan 25 2022, 9:31 AM · Restricted Project
chfast added a comment to D118037: [DAGCombine] Consider SETULT as carry flag.

What do you think about this idea in general? Can we assume or check if SETULT actually affects CL flag on given target?

Jan 25 2022, 9:27 AM · Restricted Project, Restricted Project

Jan 24 2022

chfast added a reviewer for D118037: [DAGCombine] Consider SETULT as carry flag: RKSimon.
Jan 24 2022, 12:04 PM · Restricted Project, Restricted Project
chfast committed rG9d32847b3315: [DAGCombine] Remove unused param in combineCarryDiamond(). NFC (authored by chfast).
[DAGCombine] Remove unused param in combineCarryDiamond(). NFC
Jan 24 2022, 11:57 AM
chfast requested review of D118037: [DAGCombine] Consider SETULT as carry flag.
Jan 24 2022, 5:07 AM · Restricted Project, Restricted Project
chfast updated the summary of D118035: [test][DAGCombine] Add tests for combining carry diamond. NFC.
Jan 24 2022, 4:28 AM · Restricted Project
chfast requested review of D118035: [test][DAGCombine] Add tests for combining carry diamond. NFC.
Jan 24 2022, 4:21 AM · Restricted Project

Jan 22 2022

chfast added a comment to D117680: [InstCombine] Simplify bswap -> shift.

I have noticed this post about undef/poison: https://llvm.discourse.group/t/evolution-of-undef-and-poison-over-time/5917/2.
Should I have added tests with poison instead of undef?

Jan 22 2022, 4:33 AM · Restricted Project

Jan 20 2022

chfast committed rG1d7604fdcebd: [InstCombine] Simplify bswap -> shift (authored by chfast).
[InstCombine] Simplify bswap -> shift
Jan 20 2022, 4:26 PM
chfast closed D117680: [InstCombine] Simplify bswap -> shift.
Jan 20 2022, 4:26 PM · Restricted Project
chfast updated the diff for D117680: [InstCombine] Simplify bswap -> shift.

Trigger rebuild.

Jan 20 2022, 3:47 PM · Restricted Project
chfast committed rG8457b61699e8: [test] Add tests for bswap combining. NFC (authored by chfast).
[test] Add tests for bswap combining. NFC
Jan 20 2022, 3:21 PM
chfast updated the summary of D117680: [InstCombine] Simplify bswap -> shift.
Jan 20 2022, 2:23 PM · Restricted Project
chfast added a comment to D117680: [InstCombine] Simplify bswap -> shift.

@spatel, can you also review this?

Jan 20 2022, 2:07 PM · Restricted Project
chfast removed reviewers for D117680: [InstCombine] Simplify bswap -> shift: xbolva00, reames, lebedev.ri.
Jan 20 2022, 2:05 PM · Restricted Project
chfast updated the diff for D117680: [InstCombine] Simplify bswap -> shift.

Implemented extended variant which handles "active byte" at any position, suggested by @craig.topper.

Jan 20 2022, 1:51 PM · Restricted Project
chfast added inline comments to D117680: [InstCombine] Simplify bswap -> shift.
Jan 20 2022, 12:11 PM · Restricted Project
chfast added a comment to D70079: [SelectionDAG] Combine U{ADD,SUB}O diamonds into {ADD,SUB}CARRY.

I have found one case not covered by this case: in case of subtraction when we only care about the final carry bit (the difference is discarded) the first subtraction will be to compare. So here we may want to also search for cmp. I did a prototype by duplicating this code and modifying in for the cmp case only it this works. But I'm not sure if mixing it all here will be good idea. Anyway, I wanted to reach out about it and maybe fix the TODO from this patch in the mean time.

Jan 20 2022, 8:55 AM · Restricted Project
chfast added inline comments to D88670: Reland rG4fcd1a8e6528:[llvm-exegesis] Add option to check the hardware support for a given feature before benchmarking..
Jan 20 2022, 8:36 AM · Restricted Project
chfast added a comment to D117680: [InstCombine] Simplify bswap -> shift.

Can we do computeKnownBits().countMaxActiveBits() <= 8 -> replace with shl. If (BitWidth - computeKnownBits().countMaxTrailingZeros()) <= 8 -> replace with lshr?

Jan 20 2022, 7:23 AM · Restricted Project
chfast retitled D117680: [InstCombine] Simplify bswap -> shift from [InstCombine] Fold bswap(shl(x, C)) -> and(x, 255) to [InstCombine] Simplify bswap -> shift.
Jan 20 2022, 7:08 AM · Restricted Project
chfast updated the diff for D117680: [InstCombine] Simplify bswap -> shift.

[InstCombine] Simplify bswap -> shift

Jan 20 2022, 7:07 AM · Restricted Project

Jan 19 2022

chfast added a comment to D117680: [InstCombine] Simplify bswap -> shift.

My motivation is rather boring. I have a generic data -> integer loader. The data is in big-endian order. For i32 example the data can be from 1 to 4 bytes in size. Here is the generic template which handles all 4 cases:
https://godbolt.org/z/dPcGjvb94

Jan 19 2022, 9:10 AM · Restricted Project
chfast added inline comments to D117680: [InstCombine] Simplify bswap -> shift.
Jan 19 2022, 7:45 AM · Restricted Project
chfast added reviewers for D117680: [InstCombine] Simplify bswap -> shift: RKSimon, spatel, xbolva00, reames.
Jan 19 2022, 7:44 AM · Restricted Project
chfast requested review of D117680: [InstCombine] Simplify bswap -> shift.
Jan 19 2022, 7:22 AM · Restricted Project

Jan 9 2022

chfast added inline comments to D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls..
Jan 9 2022, 4:59 AM · Restricted Project

Sep 14 2021

chfast added a comment to rG72e0846ef87d: [LVI] Don't bail on overdefined value in select.

This change has very big impact on one of my projects. It looks like the effect should be positive as it reduces the code size, stack allocation and number of spills/reloads. Yet this decreases performance by ~6%. I'd like to understand why. The bug report is in https://bugs.llvm.org/show_bug.cgi?id=51857.

Sep 14 2021, 2:48 PM

Feb 17 2021

chfast added a comment to rG257acbf6aee9: [SelectionDAG] Combine U{ADD,SUB}O diamonds into {ADD,SUB}CARRY.

Hey, I noticed that this does not always work for subtraction, probably due to canonicalization. See bug report: https://bugs.llvm.org/show_bug.cgi?id=49225.

Feb 17 2021, 9:10 AM

Feb 1 2021

chfast added inline comments to rGbb9eb1982980: Support for instrumenting only selected files or functions.
Feb 1 2021, 12:50 PM

Nov 17 2020

chfast added a comment to D18914: [clang-tidy] new readability-redundant-inline.

This check can be useful in other case like this:

Nov 17 2020, 5:48 AM

Sep 28 2020

chfast committed rG0c82fa677f24: [python][tests] Fix string comparison with "is" (authored by chfast).
[python][tests] Fix string comparison with "is"
Sep 28 2020, 12:12 PM

Nov 19 2019

chfast abandoned D70012: [DAGCombiner] Propagate carry flag for 3+ additions.

Thanks for comments @deadalnix, but please review D70079. I'm closing this one as being the duplicate of the mentioned PR.

Nov 19 2019, 11:23 PM · Restricted Project
chfast added inline comments to D70079: [SelectionDAG] Combine U{ADD,SUB}O diamonds into {ADD,SUB}CARRY.
Nov 19 2019, 12:45 AM · Restricted Project
chfast committed rGd593292f0465: [X86] Add more addcarry tests (authored by chfast).
[X86] Add more addcarry tests
Nov 19 2019, 12:10 AM
chfast closed D70237: [X86] Add more addcarry tests.
Nov 19 2019, 12:10 AM · Restricted Project

Nov 18 2019

chfast updated the diff for D70237: [X86] Add more addcarry tests.

Fix typo

Nov 18 2019, 11:58 PM · Restricted Project
chfast added a comment to D70237: [X86] Add more addcarry tests.

Thanks for the update. Where is the original source for sub_U256_without_i128_or_recursive? The IR is strange. It seems to use two different strategies for merging carry flags.

Nov 18 2019, 6:13 AM · Restricted Project
chfast updated the diff for D70237: [X86] Add more addcarry tests.

Remove URLs

Nov 18 2019, 6:12 AM · Restricted Project
chfast added a reviewer for D70079: [SelectionDAG] Combine U{ADD,SUB}O diamonds into {ADD,SUB}CARRY: chfast.
Nov 18 2019, 5:54 AM · Restricted Project
chfast added a comment to D70237: [X86] Add more addcarry tests.

I ended up with optimizing my bigint library. The end result is - add_U256_without_i128_or_recursive which works better in current LLVM release and is also nicely reduced by D70079.
The analogous implementations of subtraction is added as sub_U256_without_i128_or_recursive test. This one should be interested to you @davezarzycki, your changes make it better, but it looks it is not perfect yet.

Nov 18 2019, 3:59 AM · Restricted Project
chfast updated the diff for D70237: [X86] Add more addcarry tests.

Update addcarry tests and add a subcarry test

Nov 18 2019, 3:06 AM · Restricted Project

Nov 15 2019

chfast added a comment to D70237: [X86] Add more addcarry tests.

Yes, please update subcarry.ll too.

Nov 15 2019, 2:59 AM · Restricted Project
chfast added a comment to D70237: [X86] Add more addcarry tests.

A few comments / questions:

  1. I'm not a regular contributor to LLVM, so please wait for somebody else (like @craig.topper, @RKSimon, or @spatel) to sign off on this.
  2. Once one has "add carry", one immediately wants "sub carry/borrow". Please consider adding tests to subcarry.ll.
Nov 15 2019, 1:15 AM · Restricted Project
chfast updated the diff for D70237: [X86] Add more addcarry tests.

Add comments more descriptive test names

Nov 15 2019, 1:08 AM · Restricted Project

Nov 14 2019

chfast created D70237: [X86] Add more addcarry tests.
Nov 14 2019, 5:39 AM · Restricted Project
chfast added a comment to D70079: [SelectionDAG] Combine U{ADD,SUB}O diamonds into {ADD,SUB}CARRY.

Oh sh*i, this is the same thing I'm doing in https://reviews.llvm.org/D70012.

Nov 14 2019, 5:20 AM · Restricted Project
chfast committed rG9b89bda517cf: [DAGCombiner] Use TLI field already available. NFC (authored by chfast).
[DAGCombiner] Use TLI field already available. NFC
Nov 14 2019, 5:13 AM
chfast committed rG1c247dd028b3: [DAGCombiner] Drop redundant DAG method param. NFC (authored by chfast).
[DAGCombiner] Drop redundant DAG method param. NFC
Nov 14 2019, 5:04 AM

Nov 8 2019

chfast created D70012: [DAGCombiner] Propagate carry flag for 3+ additions.
Nov 8 2019, 8:35 AM · Restricted Project

Sep 5 2019

chfast committed rL371052: Request commit access for chfast.
Request commit access for chfast
Sep 5 2019, 3:42 AM

Feb 7 2019

chfast updated the diff for D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

Another round of changes.

Feb 7 2019, 10:43 AM · Restricted Project, Restricted Project

Feb 5 2019

chfast updated the diff for D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

Update unit tests.

Feb 5 2019, 6:28 AM · Restricted Project, Restricted Project
chfast updated the diff for D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

Hi again,

Feb 5 2019, 5:24 AM · Restricted Project, Restricted Project

Jan 3 2019

chfast added a comment to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

I did a small update.

Jan 3 2019, 1:47 PM · Restricted Project, Restricted Project
chfast updated the diff for D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

Update with some intermidiate changes.

Jan 3 2019, 1:32 PM · Restricted Project, Restricted Project
chfast added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 3 2019, 10:30 AM · Restricted Project, Restricted Project
chfast added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 3 2019, 9:50 AM · Restricted Project, Restricted Project
chfast updated the summary of D56277: AggressiveInstCombine: Add tests for full multiplication pattern match.
Jan 3 2019, 9:47 AM · Restricted Project
chfast created D56277: AggressiveInstCombine: Add tests for full multiplication pattern match.
Jan 3 2019, 9:42 AM · Restricted Project
chfast abandoned D56276: AggressiveInstCombine: Add tests for full multiplication pattern match.
Jan 3 2019, 9:02 AM
chfast created D56276: AggressiveInstCombine: Add tests for full multiplication pattern match.
Jan 3 2019, 9:02 AM

Jan 2 2019

chfast added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 2 2019, 3:55 PM · Restricted Project, Restricted Project
chfast added a comment to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.

Also, i don't think this should be hardcoded to some particular bitwidth.

Jan 2 2019, 2:28 PM · Restricted Project, Restricted Project
chfast added inline comments to D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 2 2019, 12:33 PM · Restricted Project, Restricted Project
chfast updated the summary of D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 2 2019, 12:24 PM · Restricted Project, Restricted Project
chfast created D56214: AggressiveInstCombine: Fold full mul i64 x i64 -> i128.
Jan 2 2019, 12:16 PM · Restricted Project, Restricted Project
chfast committed rL350256: Git ignore CLion project configuration files. NFC.
Git ignore CLion project configuration files. NFC
Jan 2 2019, 12:01 PM
chfast committed rL350255: Format AggresiveInstCombine.cpp. NFC.
Format AggresiveInstCombine.cpp. NFC
Jan 2 2019, 11:55 AM

Dec 8 2017

chfast added inline comments to D14104: clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak..
Dec 8 2017, 7:13 AM

May 9 2017

chfast accepted D32829: Make RuntimeDyld::MemoryManager responsible for tracking EH frames..
May 9 2017, 10:36 AM