Skip to content

Commit 827427f

Browse files
committed
AMDGPU: Don't use SDNodeXForm for DS offset output
The xform has no real valuewhen it's using out of a complex pattern output. The complex pattern was already creating TargetConstants with i16, so this was just unnecessary machinery. This allows global isel to import the simple cases once the complex pattern is implemented. llvm-svn: 366743
1 parent ff6ba3a commit 827427f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

llvm/lib/Target/AMDGPU/DSInstructions.td

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,8 @@ def : GCNPat <
608608
>;
609609

610610
class DSReadPat <DS_Pseudo inst, ValueType vt, PatFrag frag, int gds=0> : GCNPat <
611-
(vt (frag (DS1Addr1Offset i32:$ptr, i32:$offset))),
612-
(inst $ptr, (as_i16imm $offset), (i1 gds))
611+
(vt (frag (DS1Addr1Offset i32:$ptr, i16:$offset))),
612+
(inst $ptr, offset:$offset, (i1 gds))
613613
>;
614614

615615
multiclass DSReadPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
@@ -624,8 +624,8 @@ multiclass DSReadPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
624624
}
625625

626626
class DSReadPat_D16 <DS_Pseudo inst, PatFrag frag, ValueType vt> : GCNPat <
627-
(frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$in),
628-
(inst $ptr, (as_i16imm $offset), (i1 0), $in)
627+
(frag (DS1Addr1Offset i32:$ptr, i16:$offset), vt:$in),
628+
(inst $ptr, offset:$offset, (i1 0), $in)
629629
>;
630630

631631
defm : DSReadPat_mc <DS_READ_I8, i32, "sextloadi8_local">;
@@ -667,8 +667,8 @@ def : DSReadPat_D16<DS_READ_I8_D16, sextloadi8_d16_lo_local, v2f16>;
667667
}
668668

669669
class DSWritePat <DS_Pseudo inst, ValueType vt, PatFrag frag, int gds=0> : GCNPat <
670-
(frag vt:$value, (DS1Addr1Offset i32:$ptr, i32:$offset)),
671-
(inst $ptr, $value, (as_i16imm $offset), (i1 gds))
670+
(frag vt:$value, (DS1Addr1Offset i32:$ptr, i16:$offset)),
671+
(inst $ptr, $value, offset:$offset, (i1 gds))
672672
>;
673673

674674
multiclass DSWritePat_mc <DS_Pseudo inst, ValueType vt, string frag> {
@@ -684,8 +684,8 @@ multiclass DSWritePat_mc <DS_Pseudo inst, ValueType vt, string frag> {
684684
// Irritatingly, atomic_store reverses the order of operands from a
685685
// normal store.
686686
class DSAtomicWritePat <DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
687-
(frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$value),
688-
(inst $ptr, $value, (as_i16imm $offset), (i1 0))
687+
(frag (DS1Addr1Offset i32:$ptr, i16:$offset), vt:$value),
688+
(inst $ptr, $value, offset:$offset, (i1 0))
689689
>;
690690

691691
multiclass DSAtomicWritePat_mc <DS_Pseudo inst, ValueType vt, string frag> {
@@ -744,8 +744,8 @@ defm : DSWritePat_mc <DS_WRITE_B128, v4i32, "store_align16_local">;
744744

745745
} // End AddedComplexity = 100
746746
class DSAtomicRetPat<DS_Pseudo inst, ValueType vt, PatFrag frag, bit gds=0> : GCNPat <
747-
(frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$value),
748-
(inst $ptr, $value, (as_i16imm $offset), (i1 gds))
747+
(frag (DS1Addr1Offset i32:$ptr, i16:$offset), vt:$value),
748+
(inst $ptr, $value, offset:$offset, (i1 gds))
749749
>;
750750

751751
multiclass DSAtomicRetPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
@@ -764,8 +764,8 @@ multiclass DSAtomicRetPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
764764

765765

766766
class DSAtomicCmpXChg<DS_Pseudo inst, ValueType vt, PatFrag frag, bit gds=0> : GCNPat <
767-
(frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$cmp, vt:$swap),
768-
(inst $ptr, $cmp, $swap, (as_i16imm $offset), (i1 gds))
767+
(frag (DS1Addr1Offset i32:$ptr, i16:$offset), vt:$cmp, vt:$swap),
768+
(inst $ptr, $cmp, $swap, offset:$offset, (i1 gds))
769769
>;
770770

771771
multiclass DSAtomicCmpXChg_mc<DS_Pseudo inst, ValueType vt, string frag> {

0 commit comments

Comments
 (0)