@@ -178,6 +178,20 @@ static LegalityPredicate isWideScalarTruncStore(unsigned TypeIdx) {
178
178
};
179
179
}
180
180
181
+ static LegalityPredicate smallerThan (unsigned TypeIdx0, unsigned TypeIdx1) {
182
+ return [=](const LegalityQuery &Query) {
183
+ return Query.Types [TypeIdx0].getSizeInBits () <
184
+ Query.Types [TypeIdx1].getSizeInBits ();
185
+ };
186
+ }
187
+
188
+ static LegalityPredicate greaterThan (unsigned TypeIdx0, unsigned TypeIdx1) {
189
+ return [=](const LegalityQuery &Query) {
190
+ return Query.Types [TypeIdx0].getSizeInBits () >
191
+ Query.Types [TypeIdx1].getSizeInBits ();
192
+ };
193
+ };
194
+
181
195
AMDGPULegalizerInfo::AMDGPULegalizerInfo (const GCNSubtarget &ST_,
182
196
const GCNTargetMachine &TM)
183
197
: ST(ST_) {
@@ -647,20 +661,6 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
647
661
.scalarize (0 );
648
662
}
649
663
650
- auto smallerThan = [](unsigned TypeIdx0, unsigned TypeIdx1) {
651
- return [=](const LegalityQuery &Query) {
652
- return Query.Types [TypeIdx0].getSizeInBits () <
653
- Query.Types [TypeIdx1].getSizeInBits ();
654
- };
655
- };
656
-
657
- auto greaterThan = [](unsigned TypeIdx0, unsigned TypeIdx1) {
658
- return [=](const LegalityQuery &Query) {
659
- return Query.Types [TypeIdx0].getSizeInBits () >
660
- Query.Types [TypeIdx1].getSizeInBits ();
661
- };
662
- };
663
-
664
664
getActionDefinitionsBuilder (G_INTTOPTR)
665
665
// List the common cases
666
666
.legalForCartesianProduct (AddrSpaces64, {S64})
0 commit comments