This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Add D16 instructions preserve unused bits feature
ClosedPublic

Authored by kzhuravl on May 2 2018, 2:51 PM.

Details

Summary
  • Predicate D16 patterns on this new feature
  • Added this new feature to gfx900/2/4

Diff Detail

Repository
rL LLVM

Event Timeline

kzhuravl created this revision.May 2 2018, 2:51 PM
arsenm added inline comments.May 2 2018, 3:24 PM
lib/Target/AMDGPU/AMDGPU.td
319–323 ↗(On Diff #144935)

This isn't the right to handle this. The instructions themselves do exist, so should not be dependent on a subtarget feature. The assembler/disassembler should still accept them. This should be a separately named feature

arsenm added inline comments.May 3 2018, 3:05 AM
lib/Target/AMDGPU/AMDGPU.td
319–323 ↗(On Diff #144935)

We also still can select them, just under different circumstances

kzhuravl updated this revision to Diff 145139.May 3 2018, 8:38 PM
kzhuravl retitled this revision from AMDGPU: Separate D16_HI into its own feature to AMDGPU: Add D16 instructions preserve unused bits feature.
kzhuravl edited the summary of this revision. (Show Details)

Address review feedback

kzhuravl marked an inline comment as done.May 3 2018, 8:39 PM
kzhuravl added inline comments.
lib/Target/AMDGPU/AMDGPU.td
319–323 ↗(On Diff #144935)

Can this be done in a separate change?

arsenm accepted this revision.May 4 2018, 3:32 AM

LGTM. Adding run lines with a target without the feature to the assembler/disassembler tests wouldn't hurt

lib/Target/AMDGPU/AMDGPU.td
319–323 ↗(On Diff #144935)

As far as selecting them, yes

This revision is now accepted and ready to land.May 4 2018, 3:32 AM
arsenm added inline comments.May 4 2018, 3:44 AM
lib/Target/AMDGPU/AMDGPU.td
329 ↗(On Diff #145139)

Should probably note the alternative is to zero them, and specify these are memory instructions

This revision was automatically updated to reflect the committed changes.
kzhuravl marked an inline comment as done.

Does this actually apply to DS instructions?


From: Konstantin Zhuravlyov via Phabricator <reviews@reviews.llvm.org>
Sent: Friday, May 4, 2018 1:11:31 PM
To: Zhuravlyov, Konstantin; Arsenault, Matthew; Mekhanoshin, Stanislav
Cc: wei.ding2@amd.com; nhaehnle@gmail.com; Liu, Yaxun (Sam); Stuttard, David; tpr.llvm@botech.co.uk; Tye, Tony; llvm-commits@lists.llvm.org
Subject: [PATCH] D46366: AMDGPU: Add D16 instructions preserve unused bits feature

This revision was automatically updated to reflect the committed changes.
kzhuravl marked an inline comment as done.
Closed by commit rL331551: AMDGPU: Add D16 instructions preserve unused bits feature (authored by kzhuravl, committed by ).

Changed prior to commit:

https://reviews.llvm.org/D46366?vs=145139&id=145264#toc

Repository:

rL LLVM

https://reviews.llvm.org/D46366

Files:

llvm/trunk/lib/Target/AMDGPU/AMDGPU.td
llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
llvm/trunk/lib/Target/AMDGPU/AMDGPUSubtarget.h
llvm/trunk/lib/Target/AMDGPU/BUFInstructions.td
llvm/trunk/lib/Target/AMDGPU/DSInstructions.td
llvm/trunk/lib/Target/AMDGPU/FLATInstructions.td
llvm/trunk/test/CodeGen/AMDGPU/load-hi16.ll
llvm/trunk/test/CodeGen/AMDGPU/store-hi16.ll
llvm/trunk/test/MC/AMDGPU/gfx9_asm_all.s