File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -593,13 +593,29 @@ class MAIFrag<SDPatternOperator Op, code pred> : PatFrag <
593
593
pred
594
594
>;
595
595
596
- let GISelPredicateCode = [{ return MF.getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs(); }] in
597
- class AgprMAIFrag<SDPatternOperator Op> :
598
- MAIFrag<Op, [{ return MF->getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs(); }]> ;
596
+ defvar MayNeedAGPRs = [{
597
+ return MF->getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs();
598
+ }] ;
599
599
600
- let GISelPredicateCode = [{ return !MF.getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs(); }] in
601
- class VgprMAIFrag<SDPatternOperator Op> :
602
- MAIFrag<Op, [{ return !MF->getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs(); }]>;
600
+ defvar MayNeedAGPRs_gisel = [{
601
+ return MF.getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs();
602
+ }];
603
+
604
+ defvar MayNotNeedAGPRs = [{
605
+ return !MF->getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs();
606
+ }];
607
+
608
+ defvar MayNotNeedAGPRs_gisel = [{
609
+ return !MF.getInfo<SIMachineFunctionInfo>()->mayNeedAGPRs();
610
+ }];
611
+
612
+ class AgprMAIFrag<SDPatternOperator Op> : MAIFrag<Op, MayNeedAGPRs> {
613
+ let GISelPredicateCode = MayNeedAGPRs_gisel;
614
+ }
615
+
616
+ class VgprMAIFrag<SDPatternOperator Op> : MAIFrag<Op, MayNotNeedAGPRs> {
617
+ let GISelPredicateCode = MayNotNeedAGPRs_gisel;
618
+ }
603
619
604
620
let SubtargetPredicate = HasMAIInsts in {
605
621
You can’t perform that action at this time.
0 commit comments