File tree Expand file tree Collapse file tree 3 files changed +7
-19
lines changed
Expand file tree Collapse file tree 3 files changed +7
-19
lines changed Original file line number Diff line number Diff line change @@ -33,29 +33,17 @@ class AVRTTIImpl final : public BasicTTIImplBase<AVRTTIImpl> {
3333
3434 const AVRSubtarget *ST;
3535 const AVRTargetLowering *TLI;
36- const Function *currentF;
3736
3837 const AVRSubtarget *getST () const { return ST; }
3938 const AVRTargetLowering *getTLI () const { return TLI; }
4039
4140public:
4241 explicit AVRTTIImpl (const AVRTargetMachine *TM, const Function &F)
4342 : BaseT(TM, F.getDataLayout()), ST(TM->getSubtargetImpl (F)),
44- TLI(ST->getTargetLowering ()), currentF(&F) {}
43+ TLI(ST->getTargetLowering ()) {}
4544
4645 bool isLSRCostLess (const TargetTransformInfo::LSRCost &C1,
4746 const TargetTransformInfo::LSRCost &C2) const override {
48- // Detect %incdec.ptr because loop-reduce loses them
49- for (const BasicBlock &BB : *currentF) {
50- if (BB.getName ().find (" while.body" ) != std::string::npos) {
51- for (const Instruction &I : BB) {
52- std::string str;
53- llvm::raw_string_ostream (str) << I;
54- if (str.find (" %incdec.ptr" ) != std::string::npos)
55- return false ;
56- }
57- }
58- }
5947 if (C2.Insns == ~0u )
6048 return true ;
6149 return 2 * C1.Insns + C1.AddRecCost + C1.SetupCost + C1.NumRegs <
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ for.body: ; preds = %entry, %for.body
100100
101101define i8 @load8predec (ptr %x , i8 %y ) {
102102; CHECK-LABEL: load8predec:
103- ; CHECK : ld {{.*}}, -{{[XYZ]}}
103+ ; TODO : ld {{.*}}, -{{[XYZ]}}
104104entry:
105105 %tobool6 = icmp eq i8 %y , 0
106106 br i1 %tobool6 , label %while.end , label %while.body
@@ -121,8 +121,8 @@ while.end: ; preds = %while.body, %entry
121121
122122define i16 @load16predec (ptr %x , i16 %y ) {
123123; CHECK-LABEL: load16predec:
124- ; CHECK : ld {{.*}}, -{{[XYZ]}}
125- ; CHECK : ld {{.*}}, -{{[XYZ]}}
124+ ; TODO : ld {{.*}}, -{{[XYZ]}}
125+ ; TODO : ld {{.*}}, -{{[XYZ]}}
126126entry:
127127 %tobool2 = icmp eq i16 %y , 0
128128 br i1 %tobool2 , label %while.end , label %while.body
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ while.end: ; preds = %while.body, %entry
9494
9595define void @store8predec (ptr %x , i8 %y ) {
9696; CHECK-LABEL: store8predec:
97- ; CHECK : st -{{[XYZ]}}, {{.*}}
97+ ; TODO : st -{{[XYZ]}}, {{.*}}
9898entry:
9999 %tobool3 = icmp eq i8 %y , 0
100100 br i1 %tobool3 , label %while.end , label %while.body
@@ -112,8 +112,8 @@ while.end: ; preds = %while.body, %entry
112112
113113define void @store16predec (ptr %x , i16 %y ) {
114114; CHECK-LABEL: store16predec:
115- ; CHECK : st -{{[XYZ]}}, {{.*}}
116- ; CHECK : st -{{[XYZ]}}, {{.*}}
115+ ; TODO : st -{{[XYZ]}}, {{.*}}
116+ ; TODO : st -{{[XYZ]}}, {{.*}}
117117entry:
118118 %tobool3 = icmp eq i16 %y , 0
119119 br i1 %tobool3 , label %while.end , label %while.body
You can’t perform that action at this time.
0 commit comments