23 lines · plain
1; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s2 3; ARM64ISelLowering.cpp was creating a new (floating-point) load for efficiency4; but not updating chain-successors of the old one. As a result, the two memory5; operations in this function both ended up direct successors to the EntryToken6; and could be reordered.7 8@var = dso_local global i32 0, align 49 10define dso_local float @foo() {11; CHECK-LABEL: foo:12 ; Load must come before we clobber @var13; CHECK: adrp x[[VARBASE:[0-9]+]], {{_?var}}14; CHECK: ldr [[SREG:s[0-9]+]], [x[[VARBASE]],15; CHECK: str wzr, [x[[VARBASE]],16 17 %val = load i32, ptr @var, align 418 store i32 0, ptr @var, align 419 20 %fltval = sitofp i32 %val to float21 ret float %fltval22}23