nemanjai (Nemanja Ivanovic)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 23 2015, 9:38 AM (199 w, 2 d)

Recent Activity

Fri, Nov 16

nemanjai added a comment to D54663: [PowerPC] Complete the custom legalization of vector int to fp conversion.

The "recent patch" mentioned in the description is https://reviews.llvm.org/D53346.

Fri, Nov 16, 10:39 PM
nemanjai updated the diff for D54663: [PowerPC] Complete the custom legalization of vector int to fp conversion.

Actually, the handling for v2i32 is already optimal due to the DAG combine that handles this. We'll leave it in the DAG combine since that handles extractions even if they didn't come from legalizing v2i32 types (i.e. it handles a superset of the legalization added here).

Fri, Nov 16, 10:38 PM
nemanjai created D54663: [PowerPC] Complete the custom legalization of vector int to fp conversion.
Fri, Nov 16, 9:51 PM
nemanjai updated the diff for D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.

Removed the actual definitions of the static arrays from the header. Simply provided the macro for the defs in the header and the macro is used in only the two CU's that need it.
This way if we need to add any new ones, they just need to be added to the macro.

Fri, Nov 16, 1:01 PM
nemanjai committed rL347090: [PowerPC][NFC] Add tests for vector fp <-> int conversions.
[PowerPC][NFC] Add tests for vector fp <-> int conversions
Fri, Nov 16, 12:26 PM

Wed, Nov 14

nemanjai added inline comments to D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.
Wed, Nov 14, 12:35 PM

Tue, Nov 13

nemanjai accepted D49531: [PowerPC] Enhance the selection(ISD::VSELECT) of vector type.

LGTM now that we don't bitcast types any longer.

Tue, Nov 13, 8:22 AM
nemanjai added a comment to D54449: [compiler-rt][builtins][PowerPC] Enable builtins tests on PowerPC 64 bit LE .

Conceptually, COMPILER_RT_ABI is the calling convention used by all compiler-rt functions. It is explicitly named and used because it may be different from the default calling convention on some targets. In practice I believe it only affects ARM, where the calling convention uses ARM's soft-float ABI (where IIRC floats are passed in integer registers) even on targets that use the hard-float ABI by default. The compiler knows the calling conventions and emits the right code when it emits the libcalls, and the ABI declaration on the implementations causes the right calling convention to be used there. The unusual thing about the tests is that they locally declare the compiler-rt functions explicitly. So this declaration has to match the implementation. It may not matter for PPC but my recommendation would be "just use it everywhere in compiler-rt" for simplicity.

Tue, Nov 13, 5:27 AM

Mon, Nov 12

nemanjai added inline comments to D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.
Mon, Nov 12, 8:22 PM
nemanjai added a reviewer for D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser: jsji.
Mon, Nov 12, 8:22 PM
nemanjai updated the diff for D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.

This is how I meant to do it initially but was reluctant to introduce a new header dependency. However, I don't think it's an issue at all for PPCMCTargetDesc.h to have a dependency on MC/MCRegisterInfo.h.

Mon, Nov 12, 8:21 PM
nemanjai updated the diff for D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.

Did the same for the disassembler.

Mon, Nov 12, 10:31 AM
nemanjai created D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser.
Mon, Nov 12, 9:50 AM

Fri, Nov 9

nemanjai added inline comments to D49531: [PowerPC] Enhance the selection(ISD::VSELECT) of vector type.
Fri, Nov 9, 1:24 PM

Thu, Nov 8

nemanjai added a comment to D53417: [Clang][Sema]Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error.

@hubert.reinterpretcast Have your comments been addressed adequately in the latest version of the patch? Do you have an opinion on adding the test case I proposed?

Thu, Nov 8, 8:33 AM
nemanjai accepted D54087: [PowerPC] [Clang] [AltiVec] The second parameter of vec_sr function should be modulo the number of bits in the element.

Just for clarification (and please add the text to the commit message), this is actually required by the ABI:

Each element of the result vector is the result of logically right shifting the corresponding
element of ARG1 by the number of bits specified by the value of the corresponding
element of ARG2, modulo the number of bits in the element. The bits that are shifted out
are replaced by zeros.
Thu, Nov 8, 8:26 AM

Fri, Nov 2

nemanjai accepted D53581: [Power9] Add support for stxvw4x.be and stxvd2x.be intrinsics.

The test case fix can be done on the commit. Approving this now.

Fri, Nov 2, 11:52 AM
nemanjai added inline comments to D53384: [PowerPC] Make no-PIC default to match GCC - CLANG.
Fri, Nov 2, 8:29 AM
nemanjai accepted D52900: [PowerPC]Disable randomized address space on Linux ppc64le.

Since this fixes the sanitizers on PPC for the newer kernels and the fix seems perfectly reasonable and there are no concerns brought up by anyone, let's go ahead with this fix.

Fri, Nov 2, 7:58 AM

Fri, Oct 26

nemanjai added inline comments to rL345330: Add MS ABI mangling for operator<=>..
Fri, Oct 26, 2:21 AM

Thu, Oct 25

nemanjai committed rL345363: [NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py.
[NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py
Thu, Oct 25, 8:33 PM
nemanjai closed D53059: [NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py.
Thu, Oct 25, 8:33 PM
nemanjai added a comment to rL345357: [PowerPC][NFC] Add tests for some missed optimization opportunities in….

Please revert this. The way this was committed is incorrect. You've created directories such as llvm/trunk/llvm/ which we do not want. I suppose this has something to do with the fact that the patch was created using the monorepo and committed in some different way.

Thu, Oct 25, 8:25 PM
nemanjai committed rL345361: [PowerPC] Keep vector int to fp conversions in vector domain.
[PowerPC] Keep vector int to fp conversions in vector domain
Thu, Oct 25, 8:21 PM
nemanjai closed D53346: [PowerPC] Keep vector int to fp conversions in vector domain.
Thu, Oct 25, 8:21 PM
nemanjai added inline comments to rL345315: [AArch64] Create proper memoperand for multi-vector stores.
Thu, Oct 25, 7:32 PM

Tue, Oct 23

nemanjai accepted D53346: [PowerPC] Keep vector int to fp conversions in vector domain.

LGTM. Thanks.

Tue, Oct 23, 10:27 AM
nemanjai added a comment to D53275: [Power9] Exploit power9 new instruction setb.

Since the logic in the switch statement is difficult to follow, I ended up having to test this patch with a script that tries all combinations of comparisons, results and operand order in order to convince myself that it doesn't emit a setb when it is not valid to do so. Everything checks out there, but I don't really have an easy way of testing whether any opportunities are missed.
I am really hoping that you can simplify the logic in that switch to make it easier to follow.

Tue, Oct 23, 9:41 AM
nemanjai accepted D49507: [Power9] Add __float128 support in the backend for bitcast to a i128.

I think the changes that are needed are clear enough that this doesn't require another review cycle. Approving this with the assumption that the required change will be made on the commit.

Tue, Oct 23, 2:54 AM

Mon, Oct 22

nemanjai accepted D53494: [PowerPC] Improve BUILD_VECTOR of 4 i32s.

LGTM.

Mon, Oct 22, 8:41 AM
nemanjai added inline comments to D49507: [Power9] Add __float128 support in the backend for bitcast to a i128.
Mon, Oct 22, 8:01 AM
nemanjai updated the diff for D53059: [NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py.

Updated the regular expression to just eat any text that is not relevant between the function directive and its text. This seems to work for both ELFv1 and ELFv2 asm output.

Mon, Oct 22, 7:41 AM
nemanjai retitled D44528: [PowerPC] Implement canCombineStoreAndExtract and provide the missing codegen patterns from [PowerPC] Implement canCombineStoreAndExtract and provide the missing pattern for the combination to [PowerPC] Implement canCombineStoreAndExtract and provide the missing codegen patterns.
Mon, Oct 22, 5:15 AM
nemanjai updated the diff for D44528: [PowerPC] Implement canCombineStoreAndExtract and provide the missing codegen patterns.

Implemented all the patterns for codegen of extract->store.

Mon, Oct 22, 5:14 AM
nemanjai committed rL344894: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.
[PowerPC][NFC] Fix bugs in r+r to r+i conversion
Mon, Oct 22, 4:26 AM
nemanjai closed D53323: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.
Mon, Oct 22, 4:26 AM

Oct 19 2018

nemanjai updated the diff for D53323: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.
Oct 19 2018, 6:27 AM
nemanjai updated the diff for D53323: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.

Modified the changeset to not reduce the capabilities of the pass (select the correct opcode based on the register for post-ra).

Oct 19 2018, 6:19 AM
nemanjai added inline comments to D53346: [PowerPC] Keep vector int to fp conversions in vector domain.
Oct 19 2018, 5:29 AM
nemanjai added reviewers for D53346: [PowerPC] Keep vector int to fp conversions in vector domain: hfinkel, echristo.
Oct 19 2018, 4:06 AM
nemanjai accepted D53360: [PowerPC] Fix some missed optimization opportunities in combineSetCC.

Other than the minor nit, LGTM.

Oct 19 2018, 4:06 AM
nemanjai accepted D53358: [PowerPC][NFC] Add tests for some missed optimization opportunities in combineSetCC.

LGTM. I like this approach of committing the test case up front so that the patch can show the differences in code gen clearly.

Oct 19 2018, 3:38 AM
nemanjai added a reviewer for D53384: [PowerPC] Make no-PIC default to match GCC - CLANG: echristo.
Oct 19 2018, 3:36 AM
nemanjai added a comment to D53384: [PowerPC] Make no-PIC default to match GCC - CLANG.

TL; DR: +1 from me for proceeding with this patch. If you don't hear any strong objections before next week, I'd say please update the test cases and we'll go ahead with this.

Oct 19 2018, 3:35 AM
nemanjai added inline comments to D49507: [Power9] Add __float128 support in the backend for bitcast to a i128.
Oct 19 2018, 3:28 AM

Oct 16 2018

nemanjai created D53323: [PowerPC][NFC] Fix bugs in r+r to r+i conversion.
Oct 16 2018, 6:40 AM

Oct 9 2018

nemanjai added a comment to D53059: [NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py.

Thanks for your comments @MaskRay. Let me know if you think that RE would work.

Oct 9 2018, 10:57 PM
nemanjai added a comment to D46377: [PowerPC] Forward source register of add-immediate to D-Form instructions.

@steven.zhang Seems I was mistaken about your nick on Phabricator. The above comment is meant for you Steven.

Oct 9 2018, 9:25 PM
nemanjai updated subscribers of D46377: [PowerPC] Forward source register of add-immediate to D-Form instructions.

@qshanz I suspect this patch is obsolete now with your recent work on improving the r+r -> r+i transformations. If it is, I'll abandon it. If this still does something useful, we should update it and re-post.

Oct 9 2018, 9:24 PM
nemanjai committed rL344112: [PowerPC][NFC] Add a test case for extract and store patterns.
[PowerPC][NFC] Add a test case for extract and store patterns
Oct 9 2018, 9:21 PM
nemanjai created D53059: [NFC] Fix the regular expression for BE PPC in update_llc_test_checks.py.
Oct 9 2018, 9:19 PM
nemanjai committed rL344093: [DAGCombiner] Expand combining of FP logical ops to sign-setting FP ops.
[DAGCombiner] Expand combining of FP logical ops to sign-setting FP ops
Oct 9 2018, 4:22 PM
nemanjai closed D44548: [DAGCombiner] Expand combining of FP logical operations to sign-setting FP operations.
Oct 9 2018, 4:22 PM
nemanjai committed rL344091: [PowerPC][NFC] Commit nabs test case in preparation for committing D44548.
[PowerPC][NFC] Commit nabs test case in preparation for committing D44548
Oct 9 2018, 4:04 PM
nemanjai updated the diff for D44548: [DAGCombiner] Expand combining of FP logical operations to sign-setting FP operations.

Update to account for already committed PPC-specific changes.

Oct 9 2018, 2:07 PM
nemanjai committed rL344077: [PowerPC] Implement hasBitPreservingFPLogic for types that can be supported.
[PowerPC] Implement hasBitPreservingFPLogic for types that can be supported
Oct 9 2018, 1:38 PM
nemanjai added a comment to D52449: [PowerPC] Fix the assert of ISD::SIGN_EXTEND_INREG when type is v2i16 and v2i8.

Can we get this committed? This is good code cleanup that also fixes crashes (albeit ones that nobody has come across in the field).
The subsequent patch is controversial and we can deal with it separately, but this portion is non-controversial and should go upstream.

Oct 9 2018, 10:09 AM
nemanjai added a comment to D44548: [DAGCombiner] Expand combining of FP logical operations to sign-setting FP operations.

How about enabling the hook for PPC before adding to the generic DAG combine...
Right now, you'll get something horrible for normal fabs (and fneg?) without this patch, right?

	xscvdpspn 0, 1
	xxsldwi 0, 0, 0, 3
	mfvsrwz 3, 0
	rlwinm 3, 3, 0, 1, 31
	mtvsrd 0, 3
	xxsldwi 0, 0, 0, 1
	xscvspdpn 1, 0
Oct 9 2018, 10:05 AM
nemanjai added a comment to D52900: [PowerPC]Disable randomized address space on Linux ppc64le.

As for the wording, how about something like this.

WARNING: This program is being run with address space layout randomization (ASLR) enabled which prevents the thread and memory sanitizers from working on powerpc64le. ASLR will be disabled and the program re-executed.

Oct 9 2018, 9:46 AM
nemanjai updated the diff for D44548: [DAGCombiner] Expand combining of FP logical operations to sign-setting FP operations.

Rebased to account for Sanjay's patches.

Oct 9 2018, 6:46 AM
nemanjai added a comment to rL343951: [PDB] Add the ability to lookup global symbols by name..

This seems to have caused a build bot break on all PPC big endian bots. Sample build:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/20094

Oct 9 2018, 6:23 AM
nemanjai committed rL344037: Fix buildbot failures with the newly added test case (triple was missing)..
Fix buildbot failures with the newly added test case (triple was missing).
Oct 9 2018, 4:19 AM
nemanjai committed rL344036: [PowerPC] Remove self-copies in pre-emit peephole.
[PowerPC] Remove self-copies in pre-emit peephole
Oct 9 2018, 3:56 AM
nemanjai closed D52432: [PowerPC] Remove self-copies in pre-emit peephole.
Oct 9 2018, 3:56 AM
nemanjai added a comment to D52900: [PowerPC]Disable randomized address space on Linux ppc64le.

The similar change for aarch64 was done in

compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc

which seems a more "natural" location for this. Will that location not work for powerpc64?

I thought this needed to be done for more than just tsan on PPC. Lei can correct me if I'm wrong here.

Also, the wording of the warning is terrible (same as in the aarch64 one).

Feel free to suggest a different wording.

Oct 9 2018, 3:49 AM

Oct 4 2018

nemanjai updated the diff for D44548: [DAGCombiner] Expand combining of FP logical operations to sign-setting FP operations.

Since there seems to be overall agreement that this is the direction we want to go in, here's an update that removes the unsightly dual path for scalars and vectors.
Sorry about the delay in producing this update.

Oct 4 2018, 5:28 PM
nemanjai added a comment to D52878: [test-suite] Add flags for stdthreadbug.cpp when building static.

Also, please always publish Phabricator reviews with full context.

Oct 4 2018, 2:47 PM

Oct 1 2018

nemanjai accepted D51988: [PowerPC] Folding XForm to DForm loads requires alignment for some DForm loads..

LGTM.

Oct 1 2018, 8:56 AM

Sep 27 2018

nemanjai committed rL343195: [PowerPC] [NFC] Refactor code for printing register operands.
[PowerPC] [NFC] Refactor code for printing register operands
Sep 27 2018, 4:54 AM
nemanjai closed D52467: [PowerPC] [NFC] Refactor code for printing register operands.
Sep 27 2018, 4:54 AM

Sep 26 2018

nemanjai updated the diff for D52467: [PowerPC] [NFC] Refactor code for printing register operands.

Rebased and added requested comment.

Sep 26 2018, 4:31 AM
nemanjai added inline comments to D52467: [PowerPC] [NFC] Refactor code for printing register operands.
Sep 26 2018, 3:25 AM
nemanjai accepted D52345: [PowerPC] optimize conditional branch on CRSET/CRUNSET.

LGTM.

Sep 26 2018, 2:36 AM

Sep 25 2018

nemanjai added inline comments to D52467: [PowerPC] [NFC] Refactor code for printing register operands.
Sep 25 2018, 8:05 PM
nemanjai added a comment to D52432: [PowerPC] Remove self-copies in pre-emit peephole.

If the reviewers agree with my proposals for addressing the comments, I'll address them on the commit.

Sep 25 2018, 8:55 AM
nemanjai accepted D52449: [PowerPC] Fix the assert of ISD::SIGN_EXTEND_INREG when type is v2i16 and v2i8.

LGTM. Thanks for fixing this.

Sep 25 2018, 6:51 AM
nemanjai added a reviewer for D52467: [PowerPC] [NFC] Refactor code for printing register operands: syzaara.
Sep 25 2018, 6:49 AM
nemanjai created D52467: [PowerPC] [NFC] Refactor code for printing register operands.
Sep 25 2018, 6:49 AM

Sep 24 2018

nemanjai added inline comments to D52345: [PowerPC] optimize conditional branch on CRSET/CRUNSET.
Sep 24 2018, 2:23 PM
nemanjai created D52432: [PowerPC] Remove self-copies in pre-emit peephole.
Sep 24 2018, 12:33 PM
nemanjai created D52431: [PowerPC] Turn on CR-Logical reducer pass.
Sep 24 2018, 12:07 PM

Sep 21 2018

nemanjai accepted D52244: [PowerPC] Support operand modifier 'x' in inline asm.

LGTM after Jinsong's comments are addressed.
+1 for the test case comments.

Sep 21 2018, 1:07 PM
nemanjai added a comment to D52345: [PowerPC] optimize conditional branch on CRSET/CRUNSET.

I'm just curious, is there something that runs after this pass that will clean up unreachable blocks if any became unreachable? For example, if MBB1 is the only predecessor of MBB2 and MBB2 is removed as a successor to MBB1, will something remove MBB2 afterwards.

Sep 21 2018, 10:50 AM

Sep 18 2018

nemanjai planned changes to D47332: [PowerPC] Exploit the vector min/max instructions.

@jedilyn Hi Ke Wen, thanks for your comments. This needs some cleanup with regard to which instructions match the semantics of F{MIN|MAX}NUM vs. F{MIN|MAX}NAN. I'll clean that up and re-post this for your review. Thanks.

Sep 18 2018, 7:02 AM
nemanjai requested changes to D49507: [Power9] Add __float128 support in the backend for bitcast to a i128.

Since there are unaddressed comments, I'm moving this off of my Must Review queue until they are addressed.

Sep 18 2018, 6:49 AM
nemanjai committed rL342478: [PowerPC] Do not emit record-form rotates when record-form andi/andis suffices.
[PowerPC] Do not emit record-form rotates when record-form andi/andis suffices
Sep 18 2018, 6:44 AM
nemanjai closed D44897: [PowerPC] Do not emit record-form rotates when record-form andi/andis suffices.
Sep 18 2018, 6:44 AM
nemanjai committed rL342472: [PowerPC] Optimize compares fed by ANDISo.
[PowerPC] Optimize compares fed by ANDISo
Sep 18 2018, 6:23 AM
nemanjai closed D51353: [PowerPC] Optimize compares fed by ANDISo.
Sep 18 2018, 6:23 AM

Sep 14 2018

nemanjai requested changes to D51988: [PowerPC] Folding XForm to DForm loads requires alignment for some DForm loads..
Sep 14 2018, 8:14 AM
nemanjai added a comment to D51988: [PowerPC] Folding XForm to DForm loads requires alignment for some DForm loads..

Please add a test case that we used to transform to a D-Form and no longer do with your patch (preferably one for DS-Form and one for DQ-Form).

Sep 14 2018, 8:14 AM
nemanjai added a comment to D52013: Add support for powerpc64-*-linux-musl targets.

Please provide the patch with full context as per http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface. Furthermore, if you would like to commit this, it'll have to go into trunk and then it can be merged into 7.0.1 (I'm not sure that we'd be able to merge it into any 6.0 release as there may not be a 6.0.2).
Finally, for the test case you can just compile anything with llc with the triple you are interested in and a CHECK directive can check for .abiversion 2 in the assembly.

Sep 14 2018, 7:43 AM
nemanjai accepted D52040: [PowerPC] Add Itineraries of IIC_IntMulHD for P7/P8 .

LGTM.

Sep 14 2018, 7:35 AM
nemanjai accepted D52074: [PowerPC] [Clang] Add vector int128 pack/unpack builtins.
Sep 14 2018, 6:38 AM
nemanjai added a comment to D52074: [PowerPC] [Clang] Add vector int128 pack/unpack builtins.

LGTM.

Sep 14 2018, 6:38 AM
nemanjai accepted D52039: [PowerPC][NFC] Add a mulld testcase for scheduling check..

LGTM. For a change such as this, I like the idea of committing a test case prior to the patch so the patch clearly shows the difference. Thank you.

Sep 14 2018, 2:23 AM
nemanjai accepted D52072: [PowerPC] Fix the assert of combineBVOfConsecutiveLoads when element num is 1.

Minor nit, but LGTM.

Sep 14 2018, 2:21 AM

Sep 11 2018

nemanjai accepted D48185: [Power9] [LLVM] Add __float128 exponent GET and SET builtins.

LGTM.

Sep 11 2018, 10:56 AM

Aug 31 2018

nemanjai added a comment to rL341180: [XRay] FDR Record Producer/Consumer Implementation.

I think this patch caused failures (in addition to existing ones) on the PowerPC Big Endian buildbot (http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/23397). It fails unit tests in the file added in this patch, which is what makes me suspect that it is this patch that causes the failures. Can you please investigate or let me know if I need to do something on the buildbot (clean up directories, etc.)?

Aug 31 2018, 6:29 AM
nemanjai added a comment to rL341032: [XRay] Move out template and use perfect forwarding.

Hi Dean, I think this patch may have caused failures on the PPC Big Endian build bot and the failures were hidden by other build breaks that happened near the same time. Initially this caused failures at compile time which you fixed in r341042. However after that was fixed, we are now getting failures that I don't understand but certainly seem related to this patch (please refer to: http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/23322).
The failures being:

FAIL: LLVM-Unit::FDRTraceWriterTest.WriteToStringBufferVersion3
FAIL: LLVM-Unit::FDRTraceWriterTest.WriteToStringBufferVersion2
FAIL: LLVM-Unit::FDRTraceWriterTest.WriteToStringBufferVersion1
Aug 31 2018, 6:20 AM