Page MenuHomePhabricator

huihuiz (Huihui Zhang)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 9 2016, 6:44 PM (171 w, 3 d)

Recent Activity

Today

huihuiz updated the diff for D67800: [InstCombine] Fold a shifty implementation of clamp positive to allOnesValue..
Mon, Sep 23, 12:40 AM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp negative to zero..

llvm-mca results for more general folding pattern

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

make folding more general

Mon, Sep 23, 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

Mon, Sep 23, 12:12 AM · Restricted Project

Fri, Sep 20

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

resolved reviews feedback

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

resolved reviews feedback

Fri, Sep 20, 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

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

Similar to D67799

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

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

Fri, Sep 20, 4:35 PM · Restricted Project

Thu, Sep 19

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 positive to allOnesValue..
Thu, Sep 19, 11:40 PM · Restricted Project
huihuiz added a child revision for D67800: [InstCombine] Fold a shifty implementation of clamp positive to allOnesValue.: D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Thu, Sep 19, 11:40 PM · Restricted Project
huihuiz added a comment to D67800: [InstCombine] Fold a shifty implementation of clamp positive to allOnesValue..

E.g., vmin generation for ARM target

Thu, Sep 19, 11:40 PM · Restricted Project
huihuiz created D67800: [InstCombine] Fold a shifty implementation of clamp positive to allOnesValue..
Thu, Sep 19, 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 negative to zero..
Thu, Sep 19, 11:34 PM · Restricted Project
huihuiz added a child revision for D67799: [InstCombine] Fold a shifty implementation of clamp negative to zero.: D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Thu, Sep 19, 11:34 PM · Restricted Project
huihuiz added a comment to D67799: [InstCombine] Fold a shifty implementation of clamp negative to zero..

E.g., vmax generation for ARM target

Thu, Sep 19, 11:34 PM · Restricted Project
huihuiz created D67799: [InstCombine] Fold a shifty implementation of clamp negative to zero..
Thu, Sep 19, 11:30 PM · Restricted Project
huihuiz created D67798: [NFC][InstCombine] Add tests for shifty implementation of image clamping..
Thu, Sep 19, 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
huihuiz added a parent revision for D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2().: D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..
Jul 5 2019, 8:58 PM · Restricted Project
huihuiz created D64275: [InstCombine] Generalize InstCombiner::foldAndOrOfICmpsOfAndWithPow2()..
Jul 5 2019, 8:54 PM · Restricted Project

Jul 3 2019

huihuiz added inline comments to D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..
Jul 3 2019, 10:26 PM · Restricted Project

Jul 1 2019

huihuiz committed rG8e1051b3a02d: [InstCombine][NFCI] Update test cases in onehot_merge.ll (authored by huihuiz).
[InstCombine][NFCI] Update test cases in onehot_merge.ll
Jul 1 2019, 3:04 PM
huihuiz committed rL364857: [InstCombine][NFCI] Update test cases in onehot_merge.ll.
[InstCombine][NFCI] Update test cases in onehot_merge.ll
Jul 1 2019, 3:04 PM
huihuiz closed D63903: [InstCombine][NFCI] Update test cases in onehot_merge.ll.
Jul 1 2019, 3:04 PM · Restricted Project

Jun 27 2019

huihuiz updated the diff for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..

for onehot_merge.ll
mathematically speaking

(signbit l>> C)

is equivalent to

Jun 27 2019, 4:18 PM · Restricted Project
huihuiz added a parent revision for D63903: [InstCombine][NFCI] Update test cases in onehot_merge.ll: D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..
Jun 27 2019, 4:12 PM · Restricted Project
huihuiz added a child revision for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0.: D63903: [InstCombine][NFCI] Update test cases in onehot_merge.ll.
Jun 27 2019, 4:12 PM · Restricted Project
huihuiz created D63903: [InstCombine][NFCI] Update test cases in onehot_merge.ll.
Jun 27 2019, 4:12 PM · Restricted Project
huihuiz updated the diff for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..

Rebased patch, and addressed review comments.

Jun 27 2019, 11:05 AM · Restricted Project
huihuiz added inline comments to D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..
Jun 27 2019, 11:05 AM · Restricted Project

Jun 26 2019

huihuiz added inline comments to D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..
Jun 26 2019, 11:34 PM · Restricted Project
huihuiz updated the diff for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..

I simplify the code for pattern matching, more readable.

Jun 26 2019, 11:30 PM · Restricted Project
huihuiz committed rG9f69052394a4: [InstCombine][NFCI] Fix test comments. (authored by huihuiz).
[InstCombine][NFCI] Fix test comments.
Jun 26 2019, 10:47 PM
huihuiz committed rL364497: [InstCombine][NFCI] Fix test comments..
[InstCombine][NFCI] Fix test comments.
Jun 26 2019, 10:46 PM

Jun 25 2019

huihuiz committed rL364348: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two ->….
[InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two ->…
Jun 25 2019, 1:53 PM
huihuiz committed rGb90cb57b63ae: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two ->… (authored by huihuiz).
[InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two ->…
Jun 25 2019, 1:49 PM
huihuiz closed D63675: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two -> icmp eq/ne (and %x, (lshr -C1, C2)), 0..
Jun 25 2019, 1:49 PM · Restricted Project

Jun 24 2019

huihuiz committed rG2cc3b3856e27: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2)… (authored by huihuiz).
[InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2)…
Jun 24 2019, 5:16 PM
huihuiz committed rL364256: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2)….
[InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2)…
Jun 24 2019, 5:16 PM
huihuiz closed D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1..
Jun 24 2019, 5:16 PM · Restricted Project
huihuiz committed rG4626613ffe06: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x… (authored by huihuiz).
[InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x…
Jun 24 2019, 5:10 PM
huihuiz committed rL364255: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x….
[InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x…
Jun 24 2019, 5:10 PM
huihuiz closed D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 24 2019, 5:10 PM · Restricted Project
huihuiz updated the diff for D63675: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two -> icmp eq/ne (and %x, (lshr -C1, C2)), 0..

update for added vector tests

Jun 24 2019, 4:13 PM · Restricted Project
huihuiz updated the diff for D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1..

minor update for vector test,

Jun 24 2019, 4:13 PM · Restricted Project
huihuiz updated the diff for D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1..

Added vector test to check for predicate variance.
Canonicalization happens for ule -> ult , uge -> ugt

Jun 24 2019, 3:43 PM · Restricted Project
huihuiz updated the diff for D63675: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two -> icmp eq/ne (and %x, (lshr -C1, C2)), 0..

addressed review comments

Jun 24 2019, 3:03 PM · Restricted Project
huihuiz updated the diff for D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1..

remove test file for "shl-and-compare", as "shl-compare" test cases are sufficient.

Jun 24 2019, 3:01 PM · Restricted Project
huihuiz updated the diff for D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..

addressed review comments

Jun 24 2019, 2:56 PM · Restricted Project
huihuiz committed rG94b43160963d: [InstCombine] Regenerate test pr17827. NFCI. (authored by huihuiz).
[InstCombine] Regenerate test pr17827. NFCI.
Jun 24 2019, 12:52 PM
huihuiz committed rL364224: [InstCombine] Regenerate test pr17827. NFCI..
[InstCombine] Regenerate test pr17827. NFCI.
Jun 24 2019, 12:52 PM

Jun 21 2019

huihuiz added a comment to D63675: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two -> icmp eq/ne (and %x, (lshr -C1, C2)), 0..

This will fix the missing fold found in D63505

Jun 21 2019, 2:57 PM · Restricted Project
huihuiz created D63675: [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two -> icmp eq/ne (and %x, (lshr -C1, C2)), 0..
Jun 21 2019, 2:56 PM · Restricted Project
huihuiz updated the diff for D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1..

minor fix of comments in the test file

Jun 21 2019, 2:17 PM · Restricted Project
huihuiz created D63670: [InstCombine][NFC] Add test to show missing fold for icmp ult/uge (shl %x, C2), C1..
Jun 21 2019, 2:00 PM · Restricted Project
huihuiz updated the diff for D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..

Yes , this reorder expose yet another missing fold. As regression in test/Transforms/InstCombine/pr17827.ll

Jun 21 2019, 11:55 AM · Restricted Project

Jun 20 2019

huihuiz abandoned D52797: [LICM] Clear LoopToAliasSetMap when a loop being deleted is outermost or removed from its parent loop..
Jun 20 2019, 2:26 PM · Restricted Project

Jun 19 2019

huihuiz committed rG670778c76243: [InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier (authored by huihuiz).
[InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier
Jun 19 2019, 10:29 AM
huihuiz committed rL363845: [InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier.
[InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier
Jun 19 2019, 10:29 AM
huihuiz closed D63026: [InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier.
Jun 19 2019, 10:28 AM · Restricted Project
huihuiz updated the diff for D63026: [InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier.

this differential update address inline comment - adding comment for restriction this fold to single-use 'and' (PR10267)

Jun 19 2019, 10:19 AM · Restricted Project

Jun 18 2019

huihuiz added inline comments to D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 2:51 PM · Restricted Project
huihuiz added inline comments to D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 2:31 PM · Restricted Project
huihuiz committed rGd16779a732d7: [ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT. (authored by huihuiz).
[ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT.
Jun 18 2019, 1:53 PM
huihuiz committed rL363739: [ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT..
[ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT.
Jun 18 2019, 1:52 PM
huihuiz closed D63474: [ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT..
Jun 18 2019, 1:52 PM · Restricted Project
huihuiz added inline comments to D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 12:14 PM · Restricted Project
huihuiz updated the diff for D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 12:14 PM · Restricted Project
huihuiz added inline comments to D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 12:03 PM · Restricted Project
huihuiz added inline comments to D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 11:58 AM · Restricted Project
huihuiz updated the diff for D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 11:54 AM · Restricted Project
huihuiz added a comment to D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..

This is the second fold we talked about , split from D63026

Jun 18 2019, 11:19 AM · Restricted Project
huihuiz created D63505: [InstCombine] Fold icmp eq/ne (and %x, C), 0 iff (-C) is power of two -> %x u</u>= (-C) earlier..
Jun 18 2019, 11:19 AM · Restricted Project
huihuiz updated the diff for D63026: [InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier.
Jun 18 2019, 10:27 AM · Restricted Project
huihuiz added inline comments to D63026: [InstCombine] Fold icmp eq/ne (and %x, signbit), 0 -> %x s>=/s< 0 earlier.
Jun 18 2019, 10:27 AM · Restricted Project

Jun 17 2019

huihuiz added a comment to D63474: [ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT..

for example, test.ll below

Jun 17 2019, 10:05 PM · Restricted Project
huihuiz created D63474: [ARM] Comply with rules on ARMv8-A thumb mode partial deprecation of IT..
Jun 17 2019, 10:00 PM · Restricted Project
huihuiz added a comment to D63025: [InstCombine] Add tests to show missing fold opportunity for "icmp and shift" (nfc)..

Hmm, which commit? Could you just use either arc patch, or manually add Differential Revision: <link> so that there is a reference between them?

Jun 17 2019, 8:32 PM · Restricted Project

Jun 14 2019

huihuiz closed D63025: [InstCombine] Add tests to show missing fold opportunity for "icmp and shift" (nfc)..

Merged

Jun 14 2019, 5:38 PM · Restricted Project
huihuiz committed rGdc2fd6a14e71: [InstCombine] Add tests to show missing fold opportunity for "icmp and shift"… (authored by huihuiz).
[InstCombine] Add tests to show missing fold opportunity for "icmp and shift"…
Jun 14 2019, 5:32 PM
huihuiz committed rL363479: [InstCombine] Add tests to show missing fold opportunity for "icmp and shift"….
[InstCombine] Add tests to show missing fold opportunity for "icmp and shift"…
Jun 14 2019, 5:30 PM

Jun 12 2019

huihuiz updated the diff for D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0..

Original test cases are added in D63025 . Hopefully would be good coverage :)
D63026 fix fold order issue
this differential introduce new fold for icmp pred (and X, (sh signbit, Y)), 0

Jun 12 2019, 11:53 PM · Restricted Project