Page MenuHomePhabricator

huihuiz (Huihui Zhang)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 9 2016, 6:44 PM (188 w, 1 d)

Recent Activity

Yesterday

huihuiz committed rG5df53a225927: [SVE] Pass Scalable argument to VectorType::get in Bitcode Reader (authored by ctetreau).
[SVE] Pass Scalable argument to VectorType::get in Bitcode Reader
Fri, Jan 17, 11:40 AM
huihuiz closed D72792: [SVE] Pass Scalable argument to VectorType::get in Bitcode Reader.
Fri, Jan 17, 11:39 AM · Restricted Project

Dec 18 2019

huihuiz updated the diff for D71389: [ConstantFold][SVE] Fix constant folding for bitcast..

Clean up code based on reviewer feedback.

Dec 18 2019, 4:52 PM · Restricted Project
huihuiz added inline comments to D71389: [ConstantFold][SVE] Fix constant folding for bitcast..
Dec 18 2019, 4:52 PM · Restricted Project

Dec 17 2019

huihuiz updated the diff for D71389: [ConstantFold][SVE] Fix constant folding for bitcast..

Add special case handling:

Dec 17 2019, 5:38 PM · Restricted Project
huihuiz added a parent revision for D71637: [PatternMatch] Add support for matching ConstantExpr.: D71389: [ConstantFold][SVE] Fix constant folding for bitcast..
Dec 17 2019, 4:29 PM · Restricted Project
huihuiz added a child revision for D71389: [ConstantFold][SVE] Fix constant folding for bitcast.: D71637: [PatternMatch] Add support for matching ConstantExpr..
Dec 17 2019, 4:29 PM · Restricted Project
huihuiz created D71637: [PatternMatch] Add support for matching ConstantExpr..
Dec 17 2019, 4:29 PM · Restricted Project

Dec 12 2019

huihuiz added a comment to D71445: [ConstantFold][SVE] Fix constant folding for scalable vector binary operations..

Hang on a bit.
Let me see if I can find more issues in ConstantFoldBinaryInstruction.

Dec 12 2019, 5:19 PM · Restricted Project
huihuiz added a comment to D71445: [ConstantFold][SVE] Fix constant folding for scalable vector binary operations..

Similar issue , current upstream crash at void llvm::Value::doRAUW(llvm::Value *, llvm::Value::ReplaceMetadataUses): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.

Dec 12 2019, 5:02 PM · Restricted Project
huihuiz created D71445: [ConstantFold][SVE] Fix constant folding for scalable vector binary operations..
Dec 12 2019, 5:00 PM · Restricted Project
huihuiz added a comment to D71389: [ConstantFold][SVE] Fix constant folding for bitcast..

Yes, this transformation will need to go in InstCombine.
We should probably implement this when constant scalable vector support is ready, so that the effect will be most obvious.

Dec 12 2019, 1:28 PM · Restricted Project
huihuiz added a comment to D71389: [ConstantFold][SVE] Fix constant folding for bitcast..

LGTM. I don't know how many of these patches are needed, but it would be slightly more efficient to create a "vscale.ll" test file and put all of the related tests in that 1 file.

Dec 12 2019, 11:54 AM · Restricted Project

Dec 11 2019

huihuiz added a comment to D71389: [ConstantFold][SVE] Fix constant folding for bitcast..

Current upstream crash with llvm/lib/IR/Value.cpp:404: void llvm::Value::doRAUW(llvm::Value *, llvm::Value::ReplaceMetadataUses): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed.

Dec 11 2019, 9:14 PM · Restricted Project
huihuiz created D71389: [ConstantFold][SVE] Fix constant folding for bitcast..
Dec 11 2019, 9:07 PM · Restricted Project

Dec 10 2019

huihuiz added inline comments to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Dec 10 2019, 9:59 AM · Restricted Project

Dec 9 2019

huihuiz committed rG6507e1358968: [NFC] Add { } to silence compiler warning [-Wmissing-braces]. (authored by huihuiz).
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Dec 9 2019, 5:26 PM
huihuiz added inline comments to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Dec 9 2019, 4:20 PM · Restricted Project
huihuiz updated the diff for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Dec 9 2019, 4:20 PM · Restricted Project

Dec 6 2019

huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Please let me know if you have any further concerns?

Dec 6 2019, 9:44 AM · Restricted Project

Dec 5 2019

huihuiz committed rG381d3c5c45c5: [ConstantFold][SVE] Skip scalable vectors in… (authored by huihuiz).
[ConstantFold][SVE] Skip scalable vectors in…
Dec 5 2019, 7:48 PM
huihuiz closed D70985: [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction..
Dec 5 2019, 7:48 PM · Restricted Project
huihuiz updated the diff for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

"The main problem is the fix should be applied to all duplication even if BB is not removed."
-> Make sense, thank you for pointing this out.

Dec 5 2019, 1:22 PM · Restricted Project
huihuiz updated the diff for D70985: [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction..

Thank you Sanjay!

Dec 5 2019, 11:49 AM · Restricted Project

Dec 3 2019

huihuiz retitled D70985: [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction. from [InstCombine][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction. to [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction..
Dec 3 2019, 5:24 PM · Restricted Project
huihuiz updated the diff for D70985: [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction..

Addressed review feedback.

Dec 3 2019, 4:19 PM · Restricted Project
huihuiz added a comment to D70985: [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction..

current upstream crash with "void llvm::Value::doRAUW(llvm::Value *, llvm::Value::ReplaceMetadataUses): Assertion `New->getType() == getType() && "replaceAllUses of value with new value of different type!"' failed."

Dec 3 2019, 2:46 PM · Restricted Project
huihuiz created D70985: [ConstantFold][SVE] Skip scalable vectors in ConstantFoldInsertElementInstruction..
Dec 3 2019, 2:08 PM · Restricted Project
huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Hey @Carrot , really appreciated your time on it.

Dec 3 2019, 10:14 AM · Restricted Project

Dec 2 2019

huihuiz added inline comments to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Dec 2 2019, 9:08 PM · Restricted Project
huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

I would like to merge this patch, please let me know if there are any objections?

Dec 2 2019, 1:39 PM · Restricted Project
huihuiz updated the diff for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Updated test checking.

Dec 2 2019, 1:21 PM · Restricted Project

Nov 25 2019

huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Any objections with this approach?

Nov 25 2019, 12:46 PM · Restricted Project
huihuiz added a reviewer for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication.: sundeepk.
Nov 25 2019, 12:46 PM · Restricted Project

Nov 22 2019

huihuiz added inline comments to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Nov 22 2019, 12:25 PM · Restricted Project
huihuiz updated the diff for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Add reduced test case

Nov 22 2019, 12:16 PM · Restricted Project

Nov 14 2019

huihuiz updated the diff for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Addressed reviewer feedback -- add more explanation in comments.

Nov 14 2019, 2:07 PM · Restricted Project

Nov 13 2019

huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Guys, any thoughts on this?

Nov 13 2019, 2:11 PM · Restricted Project

Nov 11 2019

huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Just realize I forget to mention how the BB is removed.

Nov 11 2019, 3:32 PM · Restricted Project

Nov 8 2019

huihuiz added inline comments to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Nov 8 2019, 4:24 PM · Restricted Project
huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Actually fillWorkLists is not called for the deleted BB, but the MBBs of BBChain. The BB is deleted.
Here BBChain will have an unreleased UnscheduledPredecessors counter, when calling fillWorkLists for any MBBs within BBChain, this assertion will happen.

Nov 8 2019, 4:15 PM · Restricted Project
huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

Adding some more detailed explanation:

Nov 8 2019, 4:05 PM · Restricted Project
huihuiz added reviewers for D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication.: dexonsmith, t.p.northover.
Nov 8 2019, 3:29 PM · Restricted Project
huihuiz created D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..
Nov 8 2019, 3:19 PM · Restricted Project
huihuiz added a comment to D70030: [MachineBlockPlacement] Fix UnscheduledPredecessors counter to reflect tail duplication..

This problem caused assertion on: Assertion `BlockToChain[&MBB]->UnscheduledPredecessors == 0 && "expect unschedPred to be 0\n"' failed.

Nov 8 2019, 3:19 PM · Restricted Project

Oct 4 2019

huihuiz committed rGda9e2524917d: [NFC] Add { } to silence compiler warning [-Wmissing-braces]. (authored by huihuiz).
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Oct 4 2019, 1:04 PM
huihuiz committed rL373784: [NFC] Add { } to silence compiler warning [-Wmissing-braces]..
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Oct 4 2019, 1:04 PM

Sep 25 2019

huihuiz abandoned D58401: [MachineCSE] Improve MachineCSE profitability heuristics for better compile time..

Not a good solution

Sep 25 2019, 1:20 PM · Restricted Project
huihuiz committed rG4de7ae653256: [NFC] Add { } to silence compiler warning [-Wmissing-braces]. (authored by huihuiz).
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Sep 25 2019, 10:36 AM
huihuiz committed rL372902: [NFC] Add { } to silence compiler warning [-Wmissing-braces]..
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Sep 25 2019, 10:30 AM

Sep 24 2019

huihuiz committed rGa18b00c8d593: [NFC] Add { } to silence compiler warning [-Wmissing-braces]. (authored by huihuiz).
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Sep 24 2019, 9:39 PM
huihuiz committed rL372811: [NFC] Add { } to silence compiler warning [-Wmissing-braces]..
[NFC] Add { } to silence compiler warning [-Wmissing-braces].
Sep 24 2019, 9:38 PM

Sep 23 2019

huihuiz committed rGa4dd98f2e90b: [InstCombine] Fold a shifty implementation of clamp-to-allones. (authored by huihuiz).
[InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 23 2019, 5:29 PM
huihuiz committed rL372678: [InstCombine] Fold a shifty implementation of clamp-to-allones..
[InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 23 2019, 5:29 PM
huihuiz closed D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 23 2019, 5:29 PM · Restricted Project
huihuiz committed rG895219971592: [InstCombine] Fold a shifty implementation of clamp-to-zero. (authored by huihuiz).
[InstCombine] Fold a shifty implementation of clamp-to-zero.
Sep 23 2019, 5:19 PM
huihuiz committed rL372676: [InstCombine] Fold a shifty implementation of clamp-to-zero..
[InstCombine] Fold a shifty implementation of clamp-to-zero.
Sep 23 2019, 5:19 PM
huihuiz closed D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..
Sep 23 2019, 5:19 PM · Restricted Project
huihuiz committed rG5b5f1c8efd67: [NFC][InstCombine] Add tests for shifty implementation of clamping. (authored by huihuiz).
[NFC][InstCombine] Add tests for shifty implementation of clamping.
Sep 23 2019, 4:51 PM
huihuiz committed rL372671: [NFC][InstCombine] Add tests for shifty implementation of clamping..
[NFC][InstCombine] Add tests for shifty implementation of clamping.
Sep 23 2019, 4:47 PM
huihuiz closed D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Sep 23 2019, 4:47 PM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

This is just FYI.

Sep 23 2019, 2:16 PM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

Another note, for older generation X86 target, e.g., haswell, cmove indeed has latency 2. But able to achieve comparable uOps Per Cycle
same test input
clang clampNegToZero.ll -O2 -target x86_64 -march=haswell -S -o - | llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=haswell
before

Sep 23 2019, 12:56 AM · Restricted Project
huihuiz added a comment to D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.

llvm-mca performance result for general folding:

Sep 23 2019, 12:49 AM · Restricted Project
huihuiz updated the diff for D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 23 2019, 12:40 AM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

llvm-mca results for more general folding pattern

Sep 23 2019, 12:36 AM · Restricted Project
huihuiz updated the diff for D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

make folding more general

Sep 23 2019, 12:13 AM · Restricted Project
huihuiz updated the diff for D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..

make test more general

Sep 23 2019, 12:12 AM · Restricted Project

Sep 20 2019

huihuiz added inline comments to D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 20 2019, 6:09 PM · Restricted Project
huihuiz updated the diff for D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.

resolved reviews feedback

Sep 20 2019, 6:09 PM · Restricted Project
huihuiz updated the diff for D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

resolved reviews feedback

Sep 20 2019, 6:04 PM · Restricted Project
huihuiz updated the diff for D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..

move test "extra_use_sub" to positive case

Sep 20 2019, 6:04 PM · Restricted Project
huihuiz added a comment to D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.

Similar to D67799

Sep 20 2019, 5:58 PM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

For X86, AArch64 and ARM target, backend produce better ASM with this transformation. Please refer to below examples:

Sep 20 2019, 4:35 PM · Restricted Project

Sep 19 2019

huihuiz added a parent revision for D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping.: D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 19 2019, 11:40 PM · Restricted Project
huihuiz added a child revision for D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones: D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Sep 19 2019, 11:40 PM · Restricted Project
huihuiz added a comment to D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.

E.g., vmin generation for ARM target

Sep 19 2019, 11:40 PM · Restricted Project
huihuiz created D67800: [InstCombine] Fold a shifty implementation of clamp-to-allones.
Sep 19 2019, 11:37 PM · Restricted Project
huihuiz added a parent revision for D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping.: D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..
Sep 19 2019, 11:34 PM · Restricted Project
huihuiz added a child revision for D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero.: D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Sep 19 2019, 11:34 PM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..

E.g., vmax generation for ARM target

Sep 19 2019, 11:34 PM · Restricted Project
huihuiz created D67799: [InstCombine] Fold a shifty implementation of clamp-to-zero..
Sep 19 2019, 11:30 PM · Restricted Project
huihuiz created D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Sep 19 2019, 11:24 PM · Restricted Project

Jul 12 2019

huihuiz added inline comments to D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 12 2019, 4:10 PM · Restricted Project

Jul 11 2019

huihuiz updated the diff for D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..

forget to update the test comment, sorry

Jul 11 2019, 5:50 PM · Restricted Project
huihuiz added inline comments to D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 11 2019, 5:39 PM · Restricted Project
huihuiz updated the diff for D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 11 2019, 5:39 PM · Restricted Project
huihuiz added inline comments to D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 11 2019, 4:09 PM · Restricted Project
huihuiz updated the diff for D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 11 2019, 4:09 PM · Restricted Project
huihuiz added a comment to D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..

test case foo1_and_signbit_lshr_without_shifting_signbit_not_pwr2() aim to check that we are not creating additional shift instruction when fold fails.

Jul 11 2019, 2:43 PM · Restricted Project
huihuiz updated the diff for D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..

I think we should only create signbit shift instruction when fold is supposed to happen.

Jul 11 2019, 2:38 PM · Restricted Project
huihuiz committed rG7b4a59db1e01: [InstCombine][NFCI] Add more test coverage to onehot_merge.ll (authored by huihuiz).
[InstCombine][NFCI] Add more test coverage to onehot_merge.ll
Jul 11 2019, 2:32 PM
huihuiz committed rL365828: [InstCombine][NFCI] Add more test coverage to onehot_merge.ll.
[InstCombine][NFCI] Add more test coverage to onehot_merge.ll
Jul 11 2019, 2:32 PM
huihuiz added inline comments to D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 11 2019, 11:43 AM · Restricted Project

Jul 10 2019

huihuiz added a comment to D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..

Thanks for working on this!
This is for sure missing some one-use checks (i.e. increases instruction count).
Could you please add 5 copies of @foo1_and_signbit_lshr_without_shifting_signbit, each one with different instruction having extra use?

Jul 10 2019, 10:15 PM · Restricted Project
huihuiz updated the diff for D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..

Addressed review comments

Jul 10 2019, 10:03 PM · Restricted Project
huihuiz committed rG51f5079191d5: [InstCombine][NFCI] Add test coverage to onehot_merge.ll (authored by huihuiz).
[InstCombine][NFCI] Add test coverage to onehot_merge.ll
Jul 10 2019, 9:58 PM
huihuiz committed rL365729: [InstCombine][NFCI] Add test coverage to onehot_merge.ll.
[InstCombine][NFCI] Add test coverage to onehot_merge.ll
Jul 10 2019, 9:57 PM

Jul 5 2019

huihuiz added a child revision for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0.: D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 5 2019, 8:58 PM · Restricted Project
huihuiz updated the diff for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..

Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2() in D64275

Jul 5 2019, 8:58 PM · Restricted Project