45 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -mattr=+neon | FileCheck %s --check-prefixes=CHECK,CHECK-NEON3; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -mattr=-neon | FileCheck %s --check-prefixes=CHECK,CHECK-SCALAR4 5; Check that big fp constants can be rematerialized with movi6target triple = "aarch64-unknown-linux-gnu"7 8; float foo(void) { return float(2147483648); }9define float @foo() {10; CHECK-NEON-LABEL: foo:11; CHECK-NEON: // %bb.0: // %entry12; CHECK-NEON-NEXT: movi v0.2s, #79, lsl #2413; CHECK-NEON-NEXT: ret14;15; CHECK-SCALAR-LABEL: foo:16; CHECK-SCALAR: // %bb.0: // %entry17; CHECK-SCALAR-NEXT: mov w8, #1325400064 // =0x4f00000018; CHECK-SCALAR-NEXT: fmov s0, w819; CHECK-SCALAR-NEXT: ret20entry:21 ret float 0x41E000000000000022}23 24; float foo2(float p) { return p + float(2147483648); }25define float @foo2(float %f) {26; CHECK-NEON-LABEL: foo2:27; CHECK-NEON: // %bb.0: // %entry28; CHECK-NEON-NEXT: movi v1.2s, #79, lsl #2429; CHECK-NEON-NEXT: fadd s0, s0, s130; CHECK-NEON-NEXT: ret31;32; CHECK-SCALAR-LABEL: foo2:33; CHECK-SCALAR: // %bb.0: // %entry34; CHECK-SCALAR-NEXT: mov w8, #1325400064 // =0x4f00000035; CHECK-SCALAR-NEXT: fmov s1, w836; CHECK-SCALAR-NEXT: fadd s0, s0, s137; CHECK-SCALAR-NEXT: ret38entry:39 %p = fadd float %f, 0x41E000000000000040 ret float %p41}42 43;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:44; CHECK: {{.*}}45