Page MenuHomePhabricator

Petar.Avramovic (Petar Avramovic)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 21 2018, 6:39 AM (265 w, 4 h)

Recent Activity

Thu, Mar 9

Petar.Avramovic committed rGded69779be05: Fix SGPR + VGPR + offset Scratch offset folding (authored by Petar.Avramovic).
Fix SGPR + VGPR + offset Scratch offset folding
Thu, Mar 9, 1:55 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rG3ae310d0ae34: Fix VGPR + offset Scratch offset folding (authored by Petar.Avramovic).
Fix VGPR + offset Scratch offset folding
Thu, Mar 9, 1:55 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rG5e56d5999914: Fix SGPR + offset Scratch offset folding (authored by Petar.Avramovic).
Fix SGPR + offset Scratch offset folding
Thu, Mar 9, 1:55 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D144957: Fix SGPR + VGPR + offset Scratch offset folding.
Thu, Mar 9, 1:55 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D144956: Fix VGPR + offset Scratch offset folding.
Thu, Mar 9, 1:55 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D144955: Fix SGPR + offset Scratch offset folding.
Thu, Mar 9, 1:55 AM · Restricted Project, Restricted Project

Wed, Mar 8

Petar.Avramovic updated the diff for D144955: Fix SGPR + offset Scratch offset folding.
Wed, Mar 8, 8:59 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D144957: Fix SGPR + VGPR + offset Scratch offset folding.

add check on other place and add same check for globalisel

Wed, Mar 8, 8:14 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D144956: Fix VGPR + offset Scratch offset folding.

add same checks for globalisel

Wed, Mar 8, 8:12 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D144955: Fix SGPR + offset Scratch offset folding.

add same checks for globalisel

Wed, Mar 8, 8:11 AM · Restricted Project, Restricted Project

Tue, Mar 7

Petar.Avramovic updated the diff for D144956: Fix VGPR + offset Scratch offset folding.

Move check next to isBaseWithConstantOffset, introduce helper function that can be used in other two patches also.

Tue, Mar 7, 9:50 AM · Restricted Project, Restricted Project
Petar.Avramovic added inline comments to D144956: Fix VGPR + offset Scratch offset folding.
Tue, Mar 7, 8:37 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D144957: Fix SGPR + VGPR + offset Scratch offset folding.

Rebase

Tue, Mar 7, 4:09 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D144956: Fix VGPR + offset Scratch offset folding.

Rebase

Tue, Mar 7, 4:09 AM · Restricted Project, Restricted Project

Thu, Mar 2

Petar.Avramovic committed rGc77bd1fe15fe: AMDGPU: Add more flat scratch load and store tests for 8 and 16-bit types (authored by Petar.Avramovic).
AMDGPU: Add more flat scratch load and store tests for 8 and 16-bit types
Thu, Mar 2, 4:22 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D145081: AMDGPU: Add more flat scratch load and store tests for 8 and 16-bit types.
Thu, Mar 2, 4:21 AM · Restricted Project, Restricted Project

Wed, Mar 1

Petar.Avramovic requested review of D145081: AMDGPU: Add more flat scratch load and store tests for 8 and 16-bit types.
Wed, Mar 1, 10:04 AM · Restricted Project, Restricted Project

Tue, Feb 28

Petar.Avramovic added inline comments to D144956: Fix VGPR + offset Scratch offset folding.
Tue, Feb 28, 9:23 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D144957: Fix SGPR + VGPR + offset Scratch offset folding.
Tue, Feb 28, 4:44 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D144956: Fix VGPR + offset Scratch offset folding.
Tue, Feb 28, 4:43 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D144955: Fix SGPR + offset Scratch offset folding.
Tue, Feb 28, 4:42 AM · Restricted Project, Restricted Project

Tue, Feb 21

Petar.Avramovic abandoned D86294: AMDGPU/GlobalISel: Add tablegen operator that looks through copies.
Tue, Feb 21, 5:43 AM · Restricted Project, Restricted Project

Feb 9 2023

Petar.Avramovic committed rG13512f84f342: AMDGPU/MC: Fix decoders for VSrc_v2b32 and VSrc_v2f32 RegisterOperands (authored by Petar.Avramovic).
AMDGPU/MC: Fix decoders for VSrc_v2b32 and VSrc_v2f32 RegisterOperands
Feb 9 2023, 3:17 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rG524c89e837ec: AMDGPU/MC: Add assembler tests for v2f32 and v2b32 with imm operand (authored by Petar.Avramovic).
AMDGPU/MC: Add assembler tests for v2f32 and v2b32 with imm operand
Feb 9 2023, 3:17 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D143574: AMDGPU/MC: Fix decoders for VSrc_v2b32 and VSrc_v2f32 RegisterOperands.
Feb 9 2023, 3:17 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D143573: AMDGPU/MC: Add assembler tests for v2f32 and v2b32 with imm operand.
Feb 9 2023, 3:17 AM · Restricted Project, Restricted Project

Feb 8 2023

Petar.Avramovic updated the summary of D143573: AMDGPU/MC: Add assembler tests for v2f32 and v2b32 with imm operand.
Feb 8 2023, 8:11 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D143574: AMDGPU/MC: Fix decoders for VSrc_v2b32 and VSrc_v2f32 RegisterOperands.
Feb 8 2023, 4:59 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D143573: AMDGPU/MC: Add assembler tests for v2f32 and v2b32 with imm operand.
Feb 8 2023, 4:58 AM · Restricted Project, Restricted Project

Feb 6 2023

Petar.Avramovic committed rGa256e1d97a92: AMDGPU/MC: Fix indentation and remove unused macro after D142636 (authored by Petar.Avramovic).
AMDGPU/MC: Fix indentation and remove unused macro after D142636
Feb 6 2023, 4:23 AM · Restricted Project, Restricted Project

Feb 1 2023

Petar.Avramovic committed rGb0c1a45ba5e5: AMDGPU/MC: Refactor decoders. Rework decoders for float immediates (authored by Petar.Avramovic).
AMDGPU/MC: Refactor decoders. Rework decoders for float immediates
Feb 1 2023, 7:53 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D142636: AMDGPU/MC: Refactor decoders. Rework decoders for float immediates.
Feb 1 2023, 7:53 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D136234: [RFC][GISel] Add a way to ignore COPY instructions in InstructionSelector.

I like the GISelFlags, looks pretty lightweight.
Are you planning to add more flags?
About IgnoreCopies, it looks correct to me. Considering the possibility to break constant bus limit, patch synergies well with GISelPredicateCode that checks for it.
Can you add look through copies to Three Op Pats from VOP3 td file?
Upcoming regbankselect changes should be able to deal with copies but nevertheless I would like to see this one merged.
LGTM but I would wait for feedback from other reviewers.

Feb 1 2023, 5:07 AM · Restricted Project, Restricted Project

Jan 31 2023

Petar.Avramovic added inline comments to D142636: AMDGPU/MC: Refactor decoders. Rework decoders for float immediates.
Jan 31 2023, 5:37 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D142636: AMDGPU/MC: Refactor decoders. Rework decoders for float immediates.

Addressed comments.

Jan 31 2023, 5:12 AM · Restricted Project, Restricted Project

Jan 26 2023

Petar.Avramovic requested review of D142636: AMDGPU/MC: Refactor decoders. Rework decoders for float immediates.
Jan 26 2023, 7:56 AM · Restricted Project, Restricted Project

Jan 24 2023

Petar.Avramovic accepted D142021: AMDGPU/GlobalISel: Add stub custom regbankselect pass.
Jan 24 2023, 5:23 AM · Restricted Project, Restricted Project

Jan 20 2023

Petar.Avramovic added a comment to D142220: AMDGPU/GlobalISel: Partially fix getGenericInstructionUniformity.

This might not be related but what happens with control flow intrinsics that get preselected in legalizer?

Jan 20 2023, 7:35 AM · Restricted Project, Restricted Project

Dec 14 2022

Petar.Avramovic abandoned D139442: AMDGPU/MC: Make VReg and VISrc decoders more strict.

Implemented D139646 instead.

Dec 14 2022, 2:22 AM · Restricted Project, Restricted Project

Dec 9 2022

Petar.Avramovic committed rGcc6b10d1ee91: AMDGPU: Check if operand RC contains register used when printing (authored by Petar.Avramovic).
AMDGPU: Check if operand RC contains register used when printing
Dec 9 2022, 8:58 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rGa1ceacd05017: AMDGPU: Precommit wmma tests for D139646 (authored by Petar.Avramovic).
AMDGPU: Precommit wmma tests for D139646
Dec 9 2022, 8:58 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D139646: AMDGPU: Check if operand RC contains register used when printing.
Dec 9 2022, 8:58 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D139646: AMDGPU: Check if operand RC contains register used when printing.

Thanks for the review.

Dec 9 2022, 8:57 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D139646: AMDGPU: Check if operand RC contains register used when printing.
Dec 9 2022, 7:14 AM · Restricted Project, Restricted Project

Dec 8 2022

Petar.Avramovic added inline comments to D139646: AMDGPU: Check if operand RC contains register used when printing.
Dec 8 2022, 10:09 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D139442: AMDGPU/MC: Make VReg and VISrc decoders more strict.

Another attempt in D139646, I could to get anything better with tools available in InstPrinter.
OperandType would not make much difference (maybe for printing more verbose error for /*invalid immediate*/), I skipped adding it for now since it was possible to print some meaningful msg without it.

Dec 8 2022, 10:05 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D139646: AMDGPU: Check if operand RC contains register used when printing.
Dec 8 2022, 9:41 AM · Restricted Project, Restricted Project

Dec 7 2022

Petar.Avramovic added a comment to D139442: AMDGPU/MC: Make VReg and VISrc decoders more strict.

In most cases if instruction can't use some bits in encoding of an operand, those bits are set to default value in td file. Disassembler fails (in generic way) in this cases and does not print e.g. "instruction must use glc" (assembler prints such verbose warnings)

Dec 7 2022, 5:56 AM · Restricted Project, Restricted Project

Dec 6 2022

Petar.Avramovic requested review of D139442: AMDGPU/MC: Make VReg and VISrc decoders more strict.
Dec 6 2022, 9:32 AM · Restricted Project, Restricted Project

Dec 5 2022

Petar.Avramovic committed rGfc85ccd7b3cf: AMDGPU/MC: Simplify AsmParser for VOP3P (authored by Petar.Avramovic).
AMDGPU/MC: Simplify AsmParser for VOP3P
Dec 5 2022, 3:47 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D139194: AMDGPU/MC: Simplify AsmParser for VOP3P.
Dec 5 2022, 3:47 AM · Restricted Project, Restricted Project

Dec 2 2022

Petar.Avramovic requested review of D139194: AMDGPU/MC: Simplify AsmParser for VOP3P.
Dec 2 2022, 5:06 AM · Restricted Project, Restricted Project

Nov 18 2022

Petar.Avramovic committed rG0f3e72e86c8c: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection (authored by Petar.Avramovic).
AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection
Nov 18 2022, 9:03 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.
Nov 18 2022, 9:02 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

Update test that I missed, move to test file with other fma intrinsics.

Nov 18 2022, 8:59 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

Name change for helper function, move call inside lambda body. Copies are now created when src operand is being added to the new instruction (MIB) and inserted before it.

Nov 18 2022, 7:02 AM · Restricted Project, Restricted Project

Nov 17 2022

Petar.Avramovic added inline comments to D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.
Nov 17 2022, 8:47 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

Remove build copy from selectVOP3ModsImpl.
Copy is now built when adding operands to selected instruction.

Nov 17 2022, 8:03 AM · Restricted Project, Restricted Project
Petar.Avramovic abandoned D84533: AMDGPU/GlobalISel: Legalize s33 G_ADD, G_SUB and G_MUL.
Nov 17 2022, 1:23 AM · Restricted Project, Restricted Project

Nov 16 2022

Petar.Avramovic added a comment to D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

I did not understand last comment. What do I need to do exactly?
Now selectVOP3PMadMixModsImpl (unchanged) is called when we know that fma/mad_mix will be selected.
Afaik select modifiers functions don't fail and are called once pattern was matched.
The tricky thing here is that selectVOP3PMadMixModsImpl was used to check for actual pattern (it needs to find fpext of some operand).
Now we check for fpext before selecting modifiers for operands.

Nov 16 2022, 9:30 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

I was checking if test like this gets selected in the same way:

Nov 16 2022, 6:48 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

This should be equivalent to trunk llvm but without creating copy instruction when fma_mix does not get selected.

Nov 16 2022, 6:42 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

Now that I checked in tests with madmix that has sgpr input, copy is not created but it should have been.
Patch is not correct at this state.
Is there a way to move

if (!MatchedSrc0 && !MatchedSrc1 && !MatchedSrc2)
  return false;

in selectG_FMA_FMAD before lookup for modifiers begin via selectVOP3PMadMixModsImpl?

Nov 16 2022, 6:12 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.

Split getting the operand modifiers and potential copy construction.

Nov 16 2022, 3:15 AM · Restricted Project, Restricted Project

Nov 15 2022

Petar.Avramovic requested review of D138044: AMDGPU/GlobalISel: Fix crash after mad/fma_mix fails selection.
Nov 15 2022, 9:55 AM · Restricted Project, Restricted Project

Nov 14 2022

Petar.Avramovic added inline comments to D137932: [GlobalIsel][AMDGPU] Changing legalize rule for G_{UADDO|UADDE|USUBO|USUBE|SADDE|SSUBE}.
Nov 14 2022, 3:52 AM · Restricted Project, Restricted Project, Restricted Project

Nov 8 2022

Petar.Avramovic committed rG838d5d371ac8: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer (authored by Petar.Avramovic).
AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer
Nov 8 2022, 3:47 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D137274: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer.
Nov 8 2022, 3:47 AM · Restricted Project, Restricted Project

Nov 3 2022

Petar.Avramovic committed rGc060de72ec48: GlobalISel: Fix artifact combine value finder look through copy (authored by Petar.Avramovic).
GlobalISel: Fix artifact combine value finder look through copy
Nov 3 2022, 9:44 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D137273: GlobalISel: Fix artifact combine value finder look through copy.
Nov 3 2022, 9:44 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D137274: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer.
Nov 3 2022, 8:45 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D137274: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer.

Correction:

Change is caused by zextload being combined pre-legalizer

Change is caused by zextload NOT being combined pre-legalizer

Nov 3 2022, 8:40 AM · Restricted Project, Restricted Project

Nov 2 2022

Petar.Avramovic added a comment to D137274: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer.

To my understanding prelegalizer now also requires legalizer info?

Nov 2 2022, 11:12 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D137274: AMDGPU/GlobalISel: Fix combine crash because LI is not set in prelegalizer.
Nov 2 2022, 11:10 AM · Restricted Project, Restricted Project
Petar.Avramovic requested review of D137273: GlobalISel: Fix artifact combine value finder look through copy.
Nov 2 2022, 11:08 AM · Restricted Project, Restricted Project

Oct 24 2022

Petar.Avramovic committed rGe6c778f861cc: GlobalISel: Artifact combine merge-like and unmerge into unmerge (authored by Petar.Avramovic).
GlobalISel: Artifact combine merge-like and unmerge into unmerge
Oct 24 2022, 4:34 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rGcbc378ecb87e: GlobalISel: Artifact combine merge-like and unmerges into merge-like (authored by Petar.Avramovic).
GlobalISel: Artifact combine merge-like and unmerges into merge-like
Oct 24 2022, 4:34 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rGf1aa59804665: GlobalISel: Artifact combine merge-like and unmerge into copy (authored by Petar.Avramovic).
GlobalISel: Artifact combine merge-like and unmerge into copy
Oct 24 2022, 4:34 AM · Restricted Project, Restricted Project
Petar.Avramovic committed rG51b98db48771: GlobalISel: Precommit for artifact combine patches (authored by Petar.Avramovic).
GlobalISel: Precommit for artifact combine patches
Oct 24 2022, 4:34 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D109242: GlobalISel: Artifact combine merge-like and unmerges into merge-like.
Oct 24 2022, 4:34 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D109241: GlobalISel: Artifact combine merge-like and unmerge into unmerge.
Oct 24 2022, 4:34 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D109240: GlobalISel: Artifact combine merge-like and unmerge into copy.
Oct 24 2022, 4:33 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D117655: Precommit for build vector patches.
Oct 24 2022, 4:33 AM · Restricted Project, Restricted Project

Oct 21 2022

Petar.Avramovic updated the diff for D117655: Precommit for build vector patches.

Rebase

Oct 21 2022, 8:29 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D109242: GlobalISel: Artifact combine merge-like and unmerges into merge-like.

Use Value finder to search for unmerged elements. In some tests skips a few combine steps since value finder looks through artifacts.

Oct 21 2022, 8:28 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D109241: GlobalISel: Artifact combine merge-like and unmerge into unmerge.

Use Value finder to search for unmerged elements. In some tests skips a few combine steps since value finder looks through artifacts.

Oct 21 2022, 8:27 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D109240: GlobalISel: Artifact combine merge-like and unmerge into copy.

Use Value finder to search for unmerged elements. In some tests skips a few combine steps since value finder looks through artifacts.

Oct 21 2022, 8:26 AM · Restricted Project, Restricted Project

Oct 7 2022

Petar.Avramovic added a comment to D86294: AMDGPU/GlobalISel: Add tablegen operator that looks through copies.

You can take over. I am not so sure this will be useful as is. Just looking through copies will break constant bus limit. Then there are constants and their register banks.
I didn't like g_maybe_cross_reg_bank_copy it would be better to have some field in PatFrag recognized by the global-isel emitter (it would generate GIM_CheckOpcodeIgnoreCopies instead of GIM_CheckOpcode for all opcode checks in pattern).
But that can break constant bus limit. There is a mechanism to collect operands with
PredicateCodeUsesOperands = 1
Maybe you could add another field in PatFrag that will be a signal to generate jump-table entries that will go through collected operands and check constant bus limit for collected operands.
Just to clarify by have some field in PatFrag recognized by the global-isel emitter I meant something like HasNoUse but sdag emitter will ignore it.

Oct 7 2022, 4:30 AM · Restricted Project, Restricted Project

Oct 5 2022

Petar.Avramovic added a comment to D129690: [LLVM][AMDGPU] Specialize 32-bit atomic fadd instruction for generic address space.

When to expand part LGTM.
For clarity, you could also check for Subtarget->hasLDSFPAtomicAdd() together with Subtarget->hasAtomicFaddRtnInsts() and Subtarget->hasAtomicFaddNoRtnInsts() to match feature description and instructions generated during expansion (It looks to me that expand assumes that target has ds_add).
Can you re-check tests? There should be some changes in llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-rmw-fadd.ll, also autogenerate llvm/test/CodeGen/AMDGPU/atomicrmw-expand.ll (btw it failed for me).

Oct 5 2022, 9:14 AM · Restricted Project, Restricted Project

Oct 3 2022

Petar.Avramovic committed rG1fa2019828ca: [SelectionDAG] Add check for BUILD_VECTOR in isKnownNeverNaN (authored by Petar.Avramovic).
[SelectionDAG] Add check for BUILD_VECTOR in isKnownNeverNaN
Oct 3 2022, 3:49 AM · Restricted Project, Restricted Project
Petar.Avramovic closed D88573: [SelectionDAG] Add check for BUILD_VECTOR in isKnownNeverNaN.
Oct 3 2022, 3:48 AM · Restricted Project, Restricted Project

Sep 30 2022

Petar.Avramovic added a comment to D109240: GlobalISel: Artifact combine merge-like and unmerge into copy.

I understand now. Could I add a look through bitcast in findValueFromDefImpl? I would expect similar result as in D117328.

Sep 30 2022, 5:40 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D109240: GlobalISel: Artifact combine merge-like and unmerge into copy.

We do need to start moving all of this stuff into ArtifactValueFinder though

Like this?

Sep 30 2022, 3:39 AM · Restricted Project, Restricted Project
Petar.Avramovic planned changes to D109243: AMDGPU/GlobalISel: Add build_vector_trunc post-legalizer combine.

As mentioned before there are some regressions here. I think that it would be best to:
not lower vgpr v2s16 build_vector_trunc in regbank select, and deal with all cases in instruction select
second element is undef -> first elemenent (this patch)
default case -> bit shift packing like in regbankselect

Sep 30 2022, 2:49 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D134433: [AMDGPU][GISel] Legalize V2S16 G_BUILD_VECTOR.

Just to point out most notable regression:

Sep 30 2022, 2:03 AM · Restricted Project, Restricted Project

Sep 29 2022

Petar.Avramovic added a comment to D117328: GlobalISel: Add bitcast to tryFoldUnmergeCast.

Bitcast can be created during legalizer. About post legalizer combiner, I don't think we run artifact combiner there, If we leave it it might block some combines combines that would become available after bitcast is combined.

Sep 29 2022, 9:56 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D134433: [AMDGPU][GISel] Legalize V2S16 G_BUILD_VECTOR.

Does D134354 work for non vector cases?
My best guess is that it does not work for vectors of two elements where it would need to create two instructions (missing some build vector combine/legalizer rule). You would expect that all those build vectors in between are gone after legalizer?

Sep 29 2022, 9:42 AM · Restricted Project, Restricted Project
Petar.Avramovic added a comment to D134433: [AMDGPU][GISel] Legalize V2S16 G_BUILD_VECTOR.

You don't want (<2 x s16>) but only s16 G_FMAXNUM_IEEEwhen lowering larger vectors, also you remove G_BUILD_VECTOR_TRUNC but use G_BUILD_VECTOR instead.
Can you point me to the test case that requires those changes? (You didn't change legalization rules for other <2 x s16> instructions).
To be more precise what D134354 requires from Legalizer (and pre/post legalizer combiner). Maybe there is simpler way to achieve it.

Sep 29 2022, 9:00 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D109243: AMDGPU/GlobalISel: Add build_vector_trunc post-legalizer combine.

Rebase

Sep 29 2022, 8:07 AM · Restricted Project, Restricted Project
Petar.Avramovic updated the diff for D109242: GlobalISel: Artifact combine merge-like and unmerges into merge-like.

Rebase.

Sep 29 2022, 8:06 AM · Restricted Project, Restricted Project