34 lines · plain
1; RUN: llc -mtriple=aarch64-linux-gnu -o - %s | FileCheck %s2 3; The purpose of this test is to check that an FMOV instruction that4; only materializes an immediate is not MachineLICM'd out of a loop.5; We check this in two ways: by looking for the FMOV inside the loop,6; and also by checking that we're not spilling any FP callee-saved7; registers.8 9%struct.Node = type { ptr, ptr }10 11define void @process_nodes(ptr %0) {12; CHECK-LABEL: process_nodes:13; CHECK-NOT: stp {{d[0-9]+}}14; CHECK-LABEL: .LBB0_2:15; CHECK: fmov s0, #1.0000000016; CHECK: bl do_it17entry:18 %1 = icmp eq ptr %0, null19 br i1 %1, label %exit, label %loop20 21loop:22 %2 = phi ptr [ %4, %loop ], [ %0, %entry ]23 tail call void @do_it(float 1.000000e+00, ptr nonnull %2)24 %3 = getelementptr inbounds %struct.Node, ptr %2, i64 0, i32 025 %4 = load ptr, ptr %3, align 826 %5 = icmp eq ptr %4, null27 br i1 %5, label %exit, label %loop28 29exit:30 ret void31}32 33declare void @do_it(float, ptr)34