llvm.org GIT mirror llvm / b5ef737
Merging r314252: ------------------------------------------------------------------------ r314252 | gberry | 2017-09-26 14:40:46 -0700 (Tue, 26 Sep 2017) | 12 lines [AArch64][Falkor] Fix bug in falkor prefetcher fix pass. Summary: In rare cases, loads that don't get prefetched that were marked as strided loads could cause a crash if they occurred in a loop with other colliding loads. Reviewers: mcrosier Subscribers: aemerson, rengolin, javed.absar, kristof.beyls Differential Revision: https://reviews.llvm.org/D38261 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@314555 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 3 years ago
2 changed file(s) with 33 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
689689 if (!TII->isStridedAccess(MI))
690690 continue;
691691
692 LoadInfo LdI = *getLoadInfo(MI);
693 unsigned OldTag = *getTag(TRI, MI, LdI);
694 auto &OldCollisions = TagMap[OldTag];
692 Optional OptLdI = getLoadInfo(MI);
693 if (!OptLdI)
694 continue;
695 LoadInfo LdI = *OptLdI;
696 Optional OptOldTag = getTag(TRI, MI, LdI);
697 if (!OptOldTag)
698 continue;
699 auto &OldCollisions = TagMap[*OptOldTag];
695700 if (OldCollisions.size() <= 1)
696701 continue;
697702
304304 bb.1:
305305 RET_ReallyLR
306306 ...
307 ---
308 # Check that we handle case of strided load with no HW prefetcher tag correctly.
309
310 # CHECK-LABEL: name: hwpf_notagbug
311 # CHECK-NOT: ORRXrs %xzr
312 # CHECK: LDARW %x1
313 # CHECK-NOT: ORRXrs %xzr
314 # CHECK: LDRWui %x1
315 name: hwpf_notagbug
316 tracksRegLiveness: true
317 body: |
318 bb.0:
319 liveins: %w0, %x1, %x17
320
321 %w1 = LDARW %x1 :: ("aarch64-strided-access" load 4)
322 %w1 = LDRWui %x1, 0 :: ("aarch64-strided-access" load 4)
323 %w17 = LDRWui %x17, 0 :: ("aarch64-strided-access" load 4)
324
325 %w0 = SUBWri %w0, 1, 0
326 %wzr = SUBSWri %w0, 0, 0, implicit-def %nzcv
327 Bcc 9, %bb.0, implicit %nzcv
328
329 bb.1:
330 RET_ReallyLR
331 ...