Page MenuHomePhabricator

shchenz (ChenZheng)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 28 2018, 9:57 PM (28 w, 5 d)

Recent Activity

Mon, Jan 14

shchenz added a comment to D56679: [InstCombine] Don't undo 0 - (X * Y) canonicalization when combining subs..

Thanks for the fix.

Mon, Jan 14, 6:30 PM

Mon, Jan 7

shchenz committed rL350587: fix comment typo - NFC.
fix comment typo - NFC
Mon, Jan 7, 4:43 PM

Mon, Dec 31

shchenz committed rL350185: [InstCombine] canonicalize MUL with NEG operand.
[InstCombine] canonicalize MUL with NEG operand
Mon, Dec 31, 5:13 PM
shchenz closed D55961: [InstCombine] canonicalize MUL with NEG operand.
Mon, Dec 31, 5:13 PM

Sat, Dec 29

shchenz added a comment to D55961: [InstCombine] canonicalize MUL with NEG operand.

@lebedev.ri Updated. Thanks.

Sat, Dec 29, 3:59 PM
shchenz updated the diff for D55961: [InstCombine] canonicalize MUL with NEG operand.

fix Roman's comments

Sat, Dec 29, 3:55 PM
shchenz added a comment to D55961: [InstCombine] canonicalize MUL with NEG operand.

Hi Roman @lebedev.ri, I have updated according to your comments. Updated testcases are committed in https://reviews.llvm.org/rL350154. Thanks very much.

Sat, Dec 29, 4:45 AM
shchenz updated the diff for D55961: [InstCombine] canonicalize MUL with NEG operand.

fix according to Roman's comments.

Sat, Dec 29, 4:43 AM
shchenz committed rL350154: [InstCombine] [NFC] update testcases for canonicalize MUL with NEG operand.
[InstCombine] [NFC] update testcases for canonicalize MUL with NEG operand
Sat, Dec 29, 4:21 AM

Fri, Dec 28

shchenz added a comment to D55961: [InstCombine] canonicalize MUL with NEG operand.

@spatel Hi Sanjay, thanks very much for your comments. I have updated accordingly. Could you please help to have another review? Thanks again.

Fri, Dec 28, 6:12 AM
shchenz updated the diff for D55961: [InstCombine] canonicalize MUL with NEG operand.

fix according to Sanjay's comments

Fri, Dec 28, 6:10 AM

Thu, Dec 27

shchenz committed rL350111: [PowerPC] fix register class after converting X-FORM instruction to D-FORM….
[PowerPC] fix register class after converting X-FORM instruction to D-FORM…
Thu, Dec 27, 5:06 PM
shchenz closed D55806: [PowerPC] fix register class after converting X-FORM instruction to D-FORM instruction.
Thu, Dec 27, 5:06 PM

Wed, Dec 26

shchenz added a comment to D55806: [PowerPC] fix register class after converting X-FORM instruction to D-FORM instruction.

ping.

Wed, Dec 26, 10:49 PM

Thu, Dec 20

shchenz added inline comments to rL349847: [InstCombine] [NFC] testcases for canonicalize MUL with NEG operand.
Thu, Dec 20, 3:17 PM
shchenz created D55961: [InstCombine] canonicalize MUL with NEG operand.
Thu, Dec 20, 3:16 PM
shchenz committed rL349847: [InstCombine] [NFC] testcases for canonicalize MUL with NEG operand.
[InstCombine] [NFC] testcases for canonicalize MUL with NEG operand
Thu, Dec 20, 2:40 PM

Mon, Dec 17

shchenz created D55806: [PowerPC] fix register class after converting X-FORM instruction to D-FORM instruction.
Mon, Dec 17, 9:07 PM

Dec 13 2018

shchenz committed rL349030: [NFC][PowerPC] add verify-machineinstrs check.
[NFC][PowerPC] add verify-machineinstrs check
Dec 13 2018, 4:58 AM
shchenz committed rL349029: [PowerPC] intrinsic llvm.eh.sjlj.setjmp should not have flag isBarrier..
[PowerPC] intrinsic llvm.eh.sjlj.setjmp should not have flag isBarrier.
Dec 13 2018, 4:28 AM
shchenz closed D55499: [PowerPC] intrinsic llvm.eh.sjlj.setjmp should not have flag isBarrier..
Dec 13 2018, 4:28 AM
shchenz updated the diff for D55499: [PowerPC] intrinsic llvm.eh.sjlj.setjmp should not have flag isBarrier..

Update according to Nemanjai's comments

Dec 13 2018, 4:00 AM

Dec 9 2018

shchenz updated the summary of D55499: [PowerPC] intrinsic llvm.eh.sjlj.setjmp should not have flag isBarrier..
Dec 9 2018, 5:50 PM
shchenz created D55499: [PowerPC] intrinsic llvm.eh.sjlj.setjmp should not have flag isBarrier..
Dec 9 2018, 5:33 PM

Aug 17 2018

shchenz committed rL340000: [MISC]Fix wrong usage of std::equal().
[MISC]Fix wrong usage of std::equal()
Aug 17 2018, 12:51 AM
shchenz closed D49958: [MISC]Fix wrong usage of std::equal().
Aug 17 2018, 12:51 AM

Aug 16 2018

shchenz added a comment to D49958: [MISC]Fix wrong usage of std::equal().

This looks good to me in principle. A few thoughts:

  1. Would be great to have test coverage for [at least some of] this. If it is possible and reasonably easy of course.
  2. I wonder if we should instead create a llvm::is_splat() helper and use it here?
Aug 16 2018, 11:49 PM
shchenz updated the diff for D49958: [MISC]Fix wrong usage of std::equal().
Aug 16 2018, 11:45 PM

Aug 13 2018

shchenz added inline comments to D49958: [MISC]Fix wrong usage of std::equal().
Aug 13 2018, 7:55 PM
shchenz added a comment to D49958: [MISC]Fix wrong usage of std::equal().

Ping?

Aug 13 2018, 7:54 PM

Aug 6 2018

shchenz added a comment to D49958: [MISC]Fix wrong usage of std::equal().

ping? ^_^

Aug 6 2018, 1:24 AM

Jul 29 2018

shchenz added a comment to D49958: [MISC]Fix wrong usage of std::equal().

Thanks all for your comments.

Jul 29 2018, 1:40 AM

Jul 28 2018

shchenz updated the summary of D49958: [MISC]Fix wrong usage of std::equal().
Jul 28 2018, 5:16 PM
shchenz created D49958: [MISC]Fix wrong usage of std::equal().
Jul 28 2018, 7:03 AM
shchenz added a comment to D49837: [SelectionDAG] Handle unary SelectPatternFlavor for ABS case in SelectionDAGBuilder::visitSelect..

Please merge your code with the patch in D48754 and run related tests to check there is no failure.

I merged my code with the latest commits and run tests for X86 arch. For X86 everything is OK.
Now, I plan to make tests for other architectures and test them.
Or should I leave this for follow-up patches?

Jul 28 2018, 5:57 AM

Jul 26 2018

shchenz added a comment to D49837: [SelectionDAG] Handle unary SelectPatternFlavor for ABS case in SelectionDAGBuilder::visitSelect..

Please merge your code with the patch in D48754 and run related tests to check there is no failure.

Jul 26 2018, 10:02 PM
shchenz committed rL338092: [InstCombine] canonicalize abs pattern.
[InstCombine] canonicalize abs pattern
Jul 26 2018, 6:50 PM
shchenz closed D48754: [InstCombine] canonicalize abs pattern.
Jul 26 2018, 6:50 PM

Jul 25 2018

shchenz added inline comments to D48754: [InstCombine] canonicalize abs pattern.
Jul 25 2018, 9:39 PM
shchenz updated the diff for D48754: [InstCombine] canonicalize abs pattern.

fix Sanjay's comments.

Jul 25 2018, 9:32 PM

Jul 23 2018

shchenz updated the diff for D48754: [InstCombine] canonicalize abs pattern.

rebase the patch

Jul 23 2018, 11:03 PM

Jul 21 2018

shchenz committed rL337642: [InstrSimplify] fold sdiv if two operands are negated and non-overflow.
[InstrSimplify] fold sdiv if two operands are negated and non-overflow
Jul 21 2018, 5:33 AM
shchenz closed D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.
Jul 21 2018, 5:33 AM

Jul 20 2018

shchenz added a comment to D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

new testcases are added at rL337549

Jul 20 2018, 7:08 AM
shchenz updated the diff for D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

Fix Roman's comments

Jul 20 2018, 7:06 AM
shchenz added a comment to D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

@lebedev.ri Hi Roman, thanks for your comments. Testcases are committed. And waiting for other reviewer's comment.

Jul 20 2018, 6:45 AM
shchenz committed rL337549: [NFC][testcases] fold sdiv if two operands are negated and non-overflow.
[NFC][testcases] fold sdiv if two operands are negated and non-overflow
Jul 20 2018, 6:44 AM
shchenz committed rL337545: [InstSimplify] fold srem instruction if its two operands are negated..
[InstSimplify] fold srem instruction if its two operands are negated.
Jul 20 2018, 6:06 AM
shchenz closed D49423: [InstSimplify] fold srem instruction if its two operands are negatived..
Jul 20 2018, 6:06 AM
shchenz added a comment to D49423: [InstSimplify] fold srem instruction if its two operands are negatived..

more testcases are added at rL337543

Jul 20 2018, 6:05 AM
shchenz committed rL337543: [NFC][testcases] more testcases for folding srem if its two operands are….
[NFC][testcases] more testcases for folding srem if its two operands are…
Jul 20 2018, 5:59 AM
shchenz updated the diff for D48754: [InstCombine] canonicalize abs pattern.

fix Sanjay's comments

Jul 20 2018, 4:37 AM

Jul 19 2018

shchenz updated the diff for D49423: [InstSimplify] fold srem instruction if its two operands are negatived..

fix Roman's comments

Jul 19 2018, 11:49 PM
shchenz updated the diff for D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

fix Roman's comments.

Jul 19 2018, 11:37 PM
shchenz added a comment to D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

@lebedev.ri Hi Roman, thanks very much for your comments. I wrongly assumed we only need the cases which are truly transformed by code patch. I will add the cases you point out.

Jul 19 2018, 6:34 PM

Jul 17 2018

shchenz created D49423: [InstSimplify] fold srem instruction if its two operands are negatived..
Jul 17 2018, 6:05 AM
shchenz committed rL337270: [NFC][testcases] add testcases for folding srem whose operands are negatived..
[NFC][testcases] add testcases for folding srem whose operands are negatived.
Jul 17 2018, 5:37 AM
shchenz added a comment to D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

@spatel Hi Sanjay, thanks for your comments. I have updated accordingly. For srem instruction, I will make another patch for it. Have a good break^-^

Jul 17 2018, 2:30 AM
shchenz updated the diff for D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.

fix Sanjay's comments

Jul 17 2018, 2:28 AM

Jul 16 2018

shchenz added a comment to D49409: [testcases] move testcases to right place - NFC.

hmm, no need to create this differential. I just need to commit this directly since this is a little change and already reviewed in D49365.

Jul 16 2018, 6:43 PM
shchenz committed rL337230: [testcases] move testcases to right place - NFC.
[testcases] move testcases to right place - NFC
Jul 16 2018, 6:10 PM
shchenz closed D49409: [testcases] move testcases to right place - NFC.
Jul 16 2018, 6:09 PM
shchenz created D49409: [testcases] move testcases to right place - NFC.
Jul 16 2018, 6:05 PM
shchenz created D49382: [InstrSimplify] fold sdiv if two operands are negatived and non-overflow.
Jul 16 2018, 8:42 AM
shchenz added a comment to D48754: [InstCombine] canonicalize abs pattern.

Actually, it will fail even without the extra use, so this is a minimal test:

define i32 @abs_canonical_9(i32 %a, i32 %b) {
  %tmp2 = sub i32 %b, %a
  %tmp1 = sub i32 %a, %b
  %cmp = icmp sgt i32 %tmp1, -1
  %abs = select i1 %cmp, i32 %tmp1, i32 %tmp2
  ret i32 %abs
}

We can not just replace operands without considering the order of the instructions. It would be better to create a new instruction with the IRBuilder, so we don't have to worry about this problem.

Jul 16 2018, 8:27 AM
shchenz committed rL337179: [InstrSimplify] add testcases for fold sdiv if two operands are negatived and….
[InstrSimplify] add testcases for fold sdiv if two operands are negatived and…
Jul 16 2018, 8:11 AM
shchenz closed D49365: [InstrSimplify] add testcases for fold sdiv if two operands are negatived and non-overflow.
Jul 16 2018, 8:11 AM
shchenz updated the summary of D48754: [InstCombine] canonicalize abs pattern.
Jul 16 2018, 5:30 AM
shchenz added a comment to D49365: [InstrSimplify] add testcases for fold sdiv if two operands are negatived and non-overflow.

sub instruction to shift instruction for negation operands transformation is already done is trunk. Maybe we need to do some code refactor to let subsimplify function also call isKnownNegation().

Jul 16 2018, 2:07 AM
shchenz created D49365: [InstrSimplify] add testcases for fold sdiv if two operands are negatived and non-overflow.
Jul 16 2018, 2:05 AM
shchenz updated the summary of D49365: [InstrSimplify] add testcases for fold sdiv if two operands are negatived and non-overflow.
Jul 16 2018, 2:05 AM
shchenz updated the diff for D48754: [InstCombine] canonicalize abs pattern.

part 1 & 2 are done.
part 3: canonicalize abs pattern and fix code review comments

Jul 16 2018, 12:13 AM

Jul 15 2018

shchenz committed rL337143: [InstCombine] add more SPFofSPF folding.
[InstCombine] add more SPFofSPF folding
Jul 15 2018, 7:28 PM
shchenz closed D49238: [InstCombine] add more SPFofSPF folding.
Jul 15 2018, 7:28 PM
shchenz added a comment to D49238: [InstCombine] add more SPFofSPF folding.

@spatel Hi Sanjay, thanks for your such detailed comments. I have updated accordingly.

Jul 15 2018, 7:01 PM
shchenz updated the diff for D49238: [InstCombine] add more SPFofSPF folding.

fix Sanjay comments.

Jul 15 2018, 6:57 PM
shchenz committed rL337141: [InstCombine] fold icmp pred (sub 0, X) C for vector type.
[InstCombine] fold icmp pred (sub 0, X) C for vector type
Jul 15 2018, 5:56 PM
shchenz closed D49283: [InstCombine] fold icmp pred (sub 0, X) C for vector type.
Jul 15 2018, 5:56 PM

Jul 13 2018

shchenz added a comment to D49238: [InstCombine] add more SPFofSPF folding.

@spatel, much appriciate for your help, Sanjay. Anything wrong, please let me know. And for icmp not folded for vector type issue, I created new patch D49283 to fix it. Thanks.

Jul 13 2018, 1:38 AM
shchenz created D49283: [InstCombine] fold icmp pred (sub 0, X) C for vector type.
Jul 13 2018, 1:34 AM

Jul 12 2018

shchenz added inline comments to D49238: [InstCombine] add more SPFofSPF folding.
Jul 12 2018, 6:25 PM
shchenz added a comment to D49238: [InstCombine] add more SPFofSPF folding.

@RKSimon Hi Simon, thanks very much for your comment. I have updated accordingly.

Jul 12 2018, 3:53 PM
shchenz updated the diff for D49238: [InstCombine] add more SPFofSPF folding.

fix Simon's comments.

Jul 12 2018, 3:52 PM
shchenz added a comment to D48754: [InstCombine] canonicalize abs pattern.

@spatel Hi Sanjay, I have made changes accordingly. Could you help to have another review. Thanks.

Thanks for the changes. This looks mostly right, but I want to make sure we're testing everything properly. This is really several independent steps in 1 patch, so I'd like to reduce the risk of bugs by breaking it up.

  1. Please separate the creation of isKnownNegation() into its own patch and use it from InstSimplify -> SimplifyAddInst(). I have added tests at rL336822, so that should be a very small patch. Improving InstSimplify helps several other passes, so that's a good patch independent of abs().
  2. The changes in matchSelectPattern can be separated and tested using patterns that are optimized by InstCombiner::foldSPFofSPF(). We'll need to add some tests for that part. Let me know if it is not clear.
  3. The canonicalization changes will be the last step and should be covered by the tests shown in this patch, but I think we're missing some cases where the code may have bugs.
Jul 12 2018, 8:28 AM
shchenz added a child revision for D48754: [InstCombine] canonicalize abs pattern: D49238: [InstCombine] add more SPFofSPF folding.
Jul 12 2018, 8:19 AM
shchenz added a parent revision for D49238: [InstCombine] add more SPFofSPF folding: D48754: [InstCombine] canonicalize abs pattern.
Jul 12 2018, 8:19 AM
shchenz added a comment to D49238: [InstCombine] add more SPFofSPF folding.

Some explanation for this patch:
1, for TODO in InstCombineSelect.cpp: because matchSelectPattern() can recognize more abs pattern, including abs(-x), then the assert in canonicalizeAbsNabs() will be hit. But we decide to canonicalize pattern abs(-x) in a separated patch, I just keep canonicalizeAbsNabs() recognize the patterns which trunk recognizes. When canonicalization patch is committed, we should solve TODO.

Jul 12 2018, 8:15 AM
shchenz created D49238: [InstCombine] add more SPFofSPF folding.
Jul 12 2018, 8:00 AM
shchenz committed rL336902: [InstCombine]add testcases for folding more SPFofSPF pattern.
[InstCombine]add testcases for folding more SPFofSPF pattern
Jul 12 2018, 6:33 AM
shchenz closed D49222: [InstCombine]add testcases for folding more SPFofSPF pattern.
Jul 12 2018, 6:33 AM
shchenz added a parent revision for D49222: [InstCombine]add testcases for folding more SPFofSPF pattern: D48754: [InstCombine] canonicalize abs pattern.
Jul 12 2018, 1:57 AM
shchenz added a child revision for D48754: [InstCombine] canonicalize abs pattern: D49222: [InstCombine]add testcases for folding more SPFofSPF pattern.
Jul 12 2018, 1:57 AM
shchenz created D49222: [InstCombine]add testcases for folding more SPFofSPF pattern.
Jul 12 2018, 1:56 AM

Jul 11 2018

shchenz committed rL336881: [InstSimplify] simplify add instruction if two operands are negative.
[InstSimplify] simplify add instruction if two operands are negative
Jul 11 2018, 8:11 PM
shchenz closed D49216: [InstSimplify] simplify add instruction if two operands are negative.
Jul 11 2018, 8:11 PM
shchenz added a child revision for D48754: [InstCombine] canonicalize abs pattern: D49216: [InstSimplify] simplify add instruction if two operands are negative.
Jul 11 2018, 7:08 PM
shchenz added a parent revision for D49216: [InstSimplify] simplify add instruction if two operands are negative: D48754: [InstCombine] canonicalize abs pattern.
Jul 11 2018, 7:08 PM
shchenz created D49216: [InstSimplify] simplify add instruction if two operands are negative.
Jul 11 2018, 7:07 PM
shchenz added a comment to D49123: [test cases] add test cases for find more abs pattern.
@spatel , thanks Sanjay for closing this item. Yes, I add two spaces in front of every line manually. I think there should be no need to do that.
Jul 11 2018, 6:01 PM

Jul 10 2018

shchenz added a comment to D48754: [InstCombine] canonicalize abs pattern.

@spatel Hi Sanjay, I have made changes accordingly. Could you help to have another review. Thanks.

Jul 10 2018, 10:26 PM