Page MenuHomePhabricator

nemanjai (Nemanja Ivanovic)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 23 2015, 9:38 AM (216 w, 6 d)

Recent Activity

Today

nemanjai created D59633: [PowerPC] Look through copies for compare elimination.
Thu, Mar 21, 3:09 AM · Restricted Project

Yesterday

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

It would appear that the fix for PR 41149 should be fairly straightforward. The vector type legalizer just needs to learn about ISD::ABS. Likely just another case to be added in ScalarizeVectorResult().
PR 41160 is a common pitfall with DAG combines. I've gone ahead and reduced the test case provided in the PR.

Wed, Mar 20, 4:53 PM · Restricted Project

Mon, Mar 18

nemanjai added a comment to D57857: [PowerPC] custom lower `v2f64 fpext v2f32`.

I think approaching the problem this way is unnecessarily limited - and I say that knowing that I may have suggested a similar approach.
However, what we are actually looking to do is to convert a DAG such as:

Mon, Mar 18, 8:55 AM · Restricted Project

Wed, Mar 13

nemanjai committed rG784cdb439e98: Fix invocation of Gold plugin with LTO after r355331 (authored by nemanjai).
Fix invocation of Gold plugin with LTO after r355331
Wed, Mar 13, 4:54 PM
nemanjai committed rC356111: Fix invocation of Gold plugin with LTO after r355331.
Fix invocation of Gold plugin with LTO after r355331
Wed, Mar 13, 4:54 PM
nemanjai committed rL356111: Fix invocation of Gold plugin with LTO after r355331.
Fix invocation of Gold plugin with LTO after r355331
Wed, Mar 13, 4:54 PM
nemanjai closed D59304: Fix invocation of Gold plugin with LTO after r355331.
Wed, Mar 13, 4:54 PM · Restricted Project, Restricted Project
nemanjai added a comment to D59304: Fix invocation of Gold plugin with LTO after r355331.

Thanks Teresa, I'll commit this soon.

Wed, Mar 13, 9:43 AM · Restricted Project, Restricted Project
nemanjai created D59304: Fix invocation of Gold plugin with LTO after r355331.
Wed, Mar 13, 9:26 AM · Restricted Project, Restricted Project

Tue, Mar 12

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

OK, it appears that the PPC issue is really just a phase ordering problem that is quite easy to resolve. We now get the ISD::ABS node earlier so we may very well end up in a situation where we need to legalize the result type of such node. So our Custom legalization of all vector types can't really work any longer. Applying this in PPCISelLowering.cpp should fix the UNREACHABLE failure:

Tue, Mar 12, 5:19 AM · Restricted Project
nemanjai added a comment to D49837: [SelectionDAG] Handle unary SelectPatternFlavor for ABS case in SelectionDAGBuilder::visitSelect..

I will apply this patch and take a look at what breaks on PPC. I'll advise soon on what is needed for us.

Tue, Mar 12, 4:35 AM · Restricted Project
nemanjai accepted D58354: PowerPC: Add ImmArg to intrinsics.

Sorry about the delay. LGTM.

Tue, Mar 12, 4:04 AM
nemanjai accepted D58645: [PowerPC] Set useful flags for vector imm setting instructions.

LGTM. Sorry about the delay.

Tue, Mar 12, 3:57 AM · Restricted Project

Mon, Mar 11

nemanjai added a comment to D47332: [PowerPC] Exploit the vector min/max instructions.

Is anything happening with this? We've hit PPC issues with ISD::ABS on https://reviews.llvm.org/D49837 and I noticed that PPCTargetLowering::LowerABS has a reference to this patch.

Mon, Mar 11, 4:43 AM · Restricted Project

Tue, Mar 5

nemanjai added a comment to D58595: [TableGen][SelectionDAG][X86] Add specific isel matchers for immAllZerosV/immAllOnesV. Remove bitcasts from X86 patterns that are no longer necessary..

I think we should re-think this patch as it seems to massively increase the number of failed attempts the instruction selector makes when selecting code. Below is a trivial example:

Tue, Mar 5, 10:37 AM · Restricted Project

Mon, Mar 4

nemanjai added a comment to D55501: [PPC64][PPC] add tests for R_PPC64_REL14 R_PPC_REL14.

@sfertile Do you have any comments regarding this as you're most familiar with this part of the PPC backend?

Mon, Mar 4, 4:17 PM · Restricted Project
nemanjai added a reviewer for D55501: [PPC64][PPC] add tests for R_PPC64_REL14 R_PPC_REL14: sfertile.
Mon, Mar 4, 4:16 PM · Restricted Project
nemanjai added a comment to D58497: Clear the KnownModules cache if the preprocessor is going away.

Ping.

Mon, Mar 4, 4:16 PM · Restricted Project
nemanjai accepted D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

Sorry for the delay. LGTM.

Mon, Mar 4, 4:13 PM · Restricted Project
nemanjai added inline comments to D58070: [DAG] Remember nodes added to the worklist for pruning..
Mon, Mar 4, 3:01 PM · Restricted Project

Wed, Feb 27

nemanjai accepted D42590: [PowerPC] Try to move the stack pointer update instruction later in the prologue and earlier in the epilogue (Version 2).

LGTM with the minor comments addressed on the commit.

Wed, Feb 27, 5:01 AM · Restricted Project
nemanjai added a comment to D56286: [OPENMP] Deal with additional store inserted by Clang under -fno-PIC for PowerPC..

Is this STW instruction something that instruction scheduling might move? (@nemanjai ?)

Wed, Feb 27, 4:06 AM · Restricted Project, Restricted Project

Thu, Feb 21

nemanjai created D58497: Clear the KnownModules cache if the preprocessor is going away.
Thu, Feb 21, 3:29 AM · Restricted Project

Wed, Feb 20

nemanjai committed rG1e25464fc9b2: Make predefined FLT16 macros conditional on support for the type (authored by nemanjai).
Make predefined FLT16 macros conditional on support for the type
Wed, Feb 20, 12:27 PM
nemanjai committed rC354512: Make predefined FLT16 macros conditional on support for the type.
Make predefined FLT16 macros conditional on support for the type
Wed, Feb 20, 12:27 PM
nemanjai committed rL354512: Make predefined FLT16 macros conditional on support for the type.
Make predefined FLT16 macros conditional on support for the type
Wed, Feb 20, 12:27 PM
nemanjai closed D57577: Make predefined FLT16 macros conditional on support for the type.
Wed, Feb 20, 12:27 PM · Restricted Project, Restricted Project
nemanjai added a comment to D57577: Make predefined FLT16 macros conditional on support for the type.

Since I haven't seen any further objections to this, I'll commit this later today.

Wed, Feb 20, 4:38 AM · Restricted Project, Restricted Project
nemanjai added a comment to D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang.

This is a series of patches, which I believe should merged altogether. Currently the following patches are relevant:

No, please don't merge them together. It is much more manageable for review when they're separate patches. I realize that this makes it a bit more difficult for the author to keep the dependency ordering straight, but I think preference needs to be given to the "reviewability" of the code.

Wed, Feb 20, 4:35 AM · Restricted Project
nemanjai requested changes to D56703: PowerPC: Fix register spilling for SPE registers.

I think this is very close, but I really think the reloading code needs to be fixed.

Wed, Feb 20, 4:33 AM · Restricted Project
nemanjai accepted D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang.

Please, no more patches without context. This one was actually easy to review without context and the comments are minor, so I'm fine with these being addressed on the commit.

Wed, Feb 20, 4:19 AM · Restricted Project
nemanjai requested changes to D54409: PowerPC/SPE: Fix load/store handling for SPE.

I can't really review this without context. Could you please re-upload with context?

Wed, Feb 20, 3:48 AM · Restricted Project

Tue, Feb 19

nemanjai added inline comments to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.
Tue, Feb 19, 6:49 PM · Restricted Project
nemanjai added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

I think I misunderstood the original problem this is solving. What I thought it was solving is any inline asm or alignment directives that appear prior to the branch or its target (whichever comes last in the function). However, after looking through the code, it appears that the problem is only if the inline asm or alignment directive appears prior to the branch or its target (whichever comes first in the function).
It would probably be good to explain why it isn't a problem if the block that throws off the computation is between the branch and its target.

Tue, Feb 19, 6:44 PM · Restricted Project
nemanjai requested changes to D54583: PowerPC: Optimize SPE double parameter calling setup.

Also, as we discussed on IRC, please provide full context to make it easier to review.
I am actually OK with this revision as long as the comments are addressed, but I'm just requesting another revision to ensure all the comments have been addressed.

Tue, Feb 19, 4:13 PM

Feb 19 2019

nemanjai added a comment to D57718: [PPC] Adjust the computed branch offset for the possible shorter distance.

I can't help but feel like this patch adds further complication to an already excessively complicated function. To put things in perspective - this file is currently 282 lines and 210 of those lines are in a single function. Frankly, I think refactoring this into a few conceptual sections implemented in separate functions would go a long way.

Feb 19 2019, 12:18 PM · Restricted Project
nemanjai added a comment to D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang.

There is a long series of comments in this patch and I am not clear at this point on whether this patch breaks anything or it is fine. Could you please Request Changes if this patch is broken or approve if it is fine?

Feb 19 2019, 10:25 AM · Restricted Project
nemanjai accepted D58364: [PowerPC] exploit P9 new instruction maddld.

LGTM once the minor nits are addressed.

Feb 19 2019, 10:19 AM · Restricted Project
nemanjai requested changes to D58378: [PowerPC]Leverage the addend in the TOC relocation to do the address calculation.

This can cause relocation overflows:

$ cat b.c 
double b[1LU << 33];
double foo() { return b[(1LU << _SH) - 1] ; }
void setfoo(double d) { b[(1LU << _SH) - 1] = d; }
Feb 19 2019, 8:02 AM · Restricted Project
nemanjai added inline comments to D58378: [PowerPC]Leverage the addend in the TOC relocation to do the address calculation.
Feb 19 2019, 7:35 AM · Restricted Project

Feb 8 2019

nemanjai committed rG92a8c36735ec: [DAGCombine] Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X)) (authored by nemanjai).
[DAGCombine] Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X))
Feb 8 2019, 11:51 AM
nemanjai committed rL353557: [DAGCombine] Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X)).
[DAGCombine] Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X))
Feb 8 2019, 11:50 AM
nemanjai closed D57434: Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X)).
Feb 8 2019, 11:50 AM · Restricted Project
nemanjai added a comment to D57789: [CGP] form usub with overflow from sub+icmp.

I'll apply this and try it to see what is changed in the test cases. I'll report back when that's done.

Feb 8 2019, 5:48 AM · Restricted Project
nemanjai added a comment to D57577: Make predefined FLT16 macros conditional on support for the type.

Does anyone have any further comments or objections to this patch? I would like to commit this and close the PR.

Feb 8 2019, 4:23 AM · Restricted Project, Restricted Project
nemanjai added a comment to D57434: Optimize pow(X, 0.75) to sqrt(X) * sqrt(sqrt(X)).

Whitney, if you don't have commit access let me know and I can commit this for you. If so, I'll fix the REQUIRES: asserts in the test cases and fix the no-signed-zeros requirement on the commit.

Feb 8 2019, 4:19 AM · Restricted Project

Feb 5 2019

nemanjai added a comment to D42590: [PowerPC] Try to move the stack pointer update instruction later in the prologue and earlier in the epilogue (Version 2).

Please add the following test cases:

  1. A stack frame that is just a bit larger than required
  2. A stack frame with a CSR save that is not a fixed object
  3. A stack frame where we have to use scavenging
  4. A test case where everything fits and it saves multiple register types (GPR, FPR, VSR)
Feb 5 2019, 11:14 AM · Restricted Project
nemanjai committed rGdb64e7e9fac1: [NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default (authored by nemanjai).
[NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default
Feb 5 2019, 4:08 AM
nemanjai committed rC353163: [NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default.
[NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default
Feb 5 2019, 4:08 AM
nemanjai committed rL353163: [NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default.
[NFC] Explicitly add -std=c++14 option to tests that rely on the C++14 default
Feb 5 2019, 4:08 AM
nemanjai closed D57581: Explicitly add language standard option to test cases that rely on the C++14 default.
Feb 5 2019, 4:08 AM · Restricted Project, Restricted Project

Feb 4 2019

nemanjai accepted D57182: [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI.

LGTM. Maybe give it a couple of days in case someone else has an objection.

Feb 4 2019, 10:50 AM · Restricted Project
nemanjai updated the diff for D57581: Explicitly add language standard option to test cases that rely on the C++14 default.

Changed the option to standard C++ rather than GNU extensions.

Feb 4 2019, 10:49 AM · Restricted Project, Restricted Project
nemanjai updated the diff for D57577: Make predefined FLT16 macros conditional on support for the type.

As mentioned in a comment, the WASM tests weren't really meant to indicate that WASM supports the type. Removed the changes to the WASM target.

Feb 4 2019, 10:40 AM · Restricted Project, Restricted Project

Feb 1 2019

nemanjai added a comment to D57581: Explicitly add language standard option to test cases that rely on the C++14 default.

...
Do have a comment, though. Any, reason to use -std=gnu++14 and not -std=c++14?
Most (all?) of the tests do not seem to have anything to do with the gnu extensions, so why enable them?

Feb 1 2019, 8:56 AM · Restricted Project, Restricted Project
nemanjai created D57581: Explicitly add language standard option to test cases that rely on the C++14 default.
Feb 1 2019, 5:30 AM · Restricted Project, Restricted Project
nemanjai added inline comments to D57577: Make predefined FLT16 macros conditional on support for the type.
Feb 1 2019, 3:26 AM · Restricted Project, Restricted Project
nemanjai created D57577: Make predefined FLT16 macros conditional on support for the type.
Feb 1 2019, 3:25 AM · Restricted Project, Restricted Project

Jan 29 2019

nemanjai accepted D57314: [PowerPC] more opportunity for converting reg+reg to reg+imm.

Oh yeah, the existing condition was always true. Thanks for fixing this. LGTM.

Jan 29 2019, 5:15 AM

Jan 28 2019

nemanjai added inline comments to D56507: [PowerPC] Avoid scalarization of vector truncate.
Jan 28 2019, 2:03 PM · Restricted Project

Jan 25 2019

nemanjai added a comment to D57182: [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI.

This looks to me like the right thing to do but I added Jim Grosbach as a reviewer since he owns the MC layer.

Jan 25 2019, 5:30 PM · Restricted Project
nemanjai added a reviewer for D57182: [MC] Clean up unused inline function and non-anchor defaulted destructors; NFCI: grosbach.
Jan 25 2019, 5:27 PM · Restricted Project
nemanjai committed rL352261: [PowerPC] Update Vector Costs for P9.
[PowerPC] Update Vector Costs for P9
Jan 25 2019, 5:19 PM
nemanjai closed D55461: [PowerPC] Update Vector Costs for P9.
Jan 25 2019, 5:19 PM
nemanjai accepted D56507: [PowerPC] Avoid scalarization of vector truncate.

LGTM. I've had a pretty close look at it and am going to approve it. However, I realized that I was the only reviewer on it so I'll ask you to give it a couple of days to give at least @hfinkel and @jsji (but others as well) a chance to have a look if they are interested.

Jan 25 2019, 3:00 PM · Restricted Project
nemanjai added a comment to D39805: [Power9] Set MicroOpBufferSize for Power 9.

I think this is no longer applicable as we have set this value correctly for the CPU already. Could you close this review if so?

Jan 25 2019, 2:15 PM
nemanjai added reviewers for D56507: [PowerPC] Avoid scalarization of vector truncate: hfinkel, jsji.
Jan 25 2019, 2:15 PM · Restricted Project
nemanjai added a comment to D55461: [PowerPC] Update Vector Costs for P9.

@RolandF Do you need me to commit this for you have commit access now?

Jan 25 2019, 2:12 PM

Jan 24 2019

nemanjai committed rL352131: [PowerPC] Exploit store instructions that store a single vector element.
[PowerPC] Exploit store instructions that store a single vector element
Jan 24 2019, 3:44 PM
nemanjai closed D56175: [PowerPC] Exploit store instructions that store a single vector element.
Jan 24 2019, 3:44 PM
nemanjai added inline comments to D55461: [PowerPC] Update Vector Costs for P9.
Jan 24 2019, 10:07 AM
nemanjai accepted D55461: [PowerPC] Update Vector Costs for P9.

Thank you for the updates. I just have a couple of minor nits to add comments which can be done on the commit. LGTM.

Jan 24 2019, 10:04 AM

Jan 23 2019

nemanjai added a comment to D56175: [PowerPC] Exploit store instructions that store a single vector element.

LGTM, as long as we add the missing BE test. Thanks for exploiting this, and also great patience while discussion.

Jan 23 2019, 3:43 PM

Jan 14 2019

nemanjai added inline comments to D56175: [PowerPC] Exploit store instructions that store a single vector element.
Jan 14 2019, 2:10 PM
nemanjai added a comment to D54313: [compiler-rt][builtins][PowerPC] Add floattitf builtin compiler-rt method support for PowerPC .

Amy, can we get this committed?

Jan 14 2019, 1:51 PM
nemanjai added inline comments to D56175: [PowerPC] Exploit store instructions that store a single vector element.
Jan 14 2019, 1:50 PM

Jan 11 2019

nemanjai updated the diff for D56175: [PowerPC] Exploit store instructions that store a single vector element.

Updated the wrong indices for big endian systems. Added comments for magic numbers for indices/shift amounts.

Jan 11 2019, 7:44 AM
nemanjai added inline comments to D56175: [PowerPC] Exploit store instructions that store a single vector element.
Jan 11 2019, 6:58 AM

Jan 4 2019

nemanjai added a comment to D55503: Change llvm call once check for building Swift for PowerPC(ppc64le).

Sarvesh, I've tried this on a PPC64LE machine with one version of GLIBC and found no problems. However, I am reluctant to just go ahead with a change without testing with a few other versions of GLIBC.

Jan 4 2019, 6:22 AM

Dec 31 2018

nemanjai added inline comments to D56175: [PowerPC] Exploit store instructions that store a single vector element.
Dec 31 2018, 12:09 PM
nemanjai updated the diff for D56175: [PowerPC] Exploit store instructions that store a single vector element.

Indentation was off in the td file.

Dec 31 2018, 11:59 AM
nemanjai created D56175: [PowerPC] Exploit store instructions that store a single vector element.
Dec 31 2018, 11:34 AM
nemanjai abandoned D44528: [PowerPC] Implement canCombineStoreAndExtract and provide the missing codegen patterns.

Upon closer inspection, this actually almost never fires on PPC so spending any more time on it does not seem useful. Abandoning this patch.

Dec 31 2018, 9:25 AM

Dec 30 2018

nemanjai added inline comments to D42590: [PowerPC] Try to move the stack pointer update instruction later in the prologue and earlier in the epilogue (Version 2).
Dec 30 2018, 2:53 PM · Restricted Project
nemanjai updated the diff for D47332: [PowerPC] Exploit the vector min/max instructions.

Updated to remove the patterns for the Altivec versions of vector min/max as they have IEEE semantics wrt. handling NaN. A subsequent patch will legalize the _IEEE versions of the nodes for single precision and provide patterns to match them to vmaxfp/vminfp.

Dec 30 2018, 5:25 AM · Restricted Project
nemanjai added inline comments to D54583: PowerPC: Optimize SPE double parameter calling setup.
Dec 30 2018, 5:13 AM
nemanjai accepted D56148: [PowerPC] Fix machine verify pass error for PATCHPOINT pseudo instruction that bad machine code.

LGTM.

Dec 30 2018, 5:05 AM

Dec 29 2018

nemanjai added a comment to D47332: [PowerPC] Exploit the vector min/max instructions.

This covers PR39130 right?

Maybe worth adding the new vec-min-max.ll test file to trunk with current codegen so this patch shows the improved codegen diff?

Dec 29 2018, 4:37 PM · Restricted Project
nemanjai added a comment to D20019: [PPC] exploitation of new xscmp*, as well as xsmaxcdp and xsmincdp.

We have neglected this for a very long time. Just adding a comment to trickle it up to the top of the review queue and I plan to review it very soon.

Dec 29 2018, 3:28 PM
nemanjai requested changes to D42590: [PowerPC] Try to move the stack pointer update instruction later in the prologue and earlier in the epilogue (Version 2).

I think this is close to ready but there are a few comments that have to be addressed. Also, @hfinkel and @inouehrs do you see anything that needs to be handled in addition to what I commented on?

Dec 29 2018, 3:17 PM · Restricted Project
nemanjai requested changes to D55326: [Driver] Fix incorrect GNU triplet for PowerPC on SUSE Linux.

A couple of questions since I am not all that familiar with clang and am certainly not familiar with this unusual SUSE 32-bit situation:

  • We seem to be changing the set of aliases here, but what happens if someone actually explicitly specifies --target=powerpc-suse-linux?
  • Do we need to change anything about include paths?
  • Can you describe the default triple for clang on SUSE 32-bit PPC? Will it be powerpc-suse-linux? powerpc64-suse-linux?
  • Will this change not affect 64-bit PPC SUSE? Namely will the default libraries on actual 64-bit PPC SUSE big endian systems now be 32-bit libraries?
  • Can you please add a test case and a patch with full context before this patch can go any further?
Dec 29 2018, 2:20 PM
nemanjai accepted D54409: PowerPC/SPE: Fix load/store handling for SPE.

Other than the minor nit about the test case, LGTM.

Dec 29 2018, 1:43 PM · Restricted Project
nemanjai accepted D55810: [Power9] Enable the Out-of-Order scheduling model for P9 hw.

LGTM. We definitely want to go ahead with this.

Dec 29 2018, 1:35 PM
nemanjai added inline comments to D54583: PowerPC: Optimize SPE double parameter calling setup.
Dec 29 2018, 1:33 PM
nemanjai added a comment to D33499: [PPC] PPC32/Darwin ABI info.

@iains - I have interest in resolving this issue, and also a couple of other lingering bugs in the PPC32Darwin ABI realm. If you have your WIP available anywhere, I'd be happy to have a go at bringing it up to current.

Dec 29 2018, 12:24 PM
nemanjai added a comment to D55686: [PowerPC] Fix assert from machine verify pass that unmatched register class about fcmp selection in fast-isel.

I assume that we are fixing this specific instance because we have a test case that breaks if we turn on verification by default. However, I would assume that we actually have a lot of other failures hiding in here which would be uncovered by doing a bootstrap build with -O0. I am not suggesting that we put all the fixes in a single patch, just that we want to do more thorough testing before we turn on MachineFunction verification by default.

Dec 29 2018, 12:20 PM
nemanjai added inline comments to D56148: [PowerPC] Fix machine verify pass error for PATCHPOINT pseudo instruction that bad machine code.
Dec 29 2018, 8:30 AM
nemanjai committed rL350156: [PowerPC][NFC] Macro for register set defs for the Asm Parser.
[PowerPC][NFC] Macro for register set defs for the Asm Parser
Dec 29 2018, 8:17 AM
nemanjai closed D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.
Dec 29 2018, 8:17 AM
nemanjai committed rL350155: [PowerPC] Complete the custom legalization of vector int to fp conversion.
[PowerPC] Complete the custom legalization of vector int to fp conversion
Dec 29 2018, 5:45 AM