From b8bda5093269dfd9e295e445f4cbbdc85c192753 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 18 Jul 2023 12:41:09 +0100 Subject: [PATCH] [Sparc] Regenerate float-constants.ll test checks --- llvm/test/CodeGen/SPARC/float-constants.ll | 71 ++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/llvm/test/CodeGen/SPARC/float-constants.ll b/llvm/test/CodeGen/SPARC/float-constants.ll index 73ebeff7..873c1f9 100644 --- a/llvm/test/CodeGen/SPARC/float-constants.ll +++ b/llvm/test/CodeGen/SPARC/float-constants.ll @@ -1,15 +1,22 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 ; RUN: llc < %s -march=sparc | FileCheck %s ; RUN: llc < %s -march=sparcel | FileCheck %s --check-prefix=CHECK-LE ;; Bitcast should not do a runtime conversion, but rather emit a ;; constant into integer registers directly. +define <2 x i32> @bitcast() nounwind { ; CHECK-LABEL: bitcast: -; CHECK: sethi 1049856, %o0 -; CHECK: mov %g0, %o1 -; CHECK-LE: mov %g0, %o0 -; CHECK-LE: sethi 1049856, %o1 -define <2 x i32> @bitcast() { +; CHECK: ! %bb.0: +; CHECK-NEXT: sethi 1049856, %o0 +; CHECK-NEXT: retl +; CHECK-NEXT: mov %g0, %o1 +; +; CHECK-LE-LABEL: bitcast: +; CHECK-LE: ! %bb.0: +; CHECK-LE-NEXT: mov %g0, %o0 +; CHECK-LE-NEXT: retl +; CHECK-LE-NEXT: sethi 1049856, %o1 %1 = bitcast double 5.0 to <2 x i32> ret <2 x i32> %1 } @@ -17,13 +24,25 @@ define <2 x i32> @bitcast() { ;; Same thing for a call using a double (which gets passed in integer ;; registers) -; CHECK-LABEL: test_call -; CHECK: sethi 1049856, %o0 -; CHECK: mov %g0, %o1 -; CHECK-LE: sethi 1049856, %o1 -; CHECK-LE: mov %g0, %o0 declare void @a(double) -define void @test_call() { +define void @test_call() nounwind { +; CHECK-LABEL: test_call: +; CHECK: ! %bb.0: +; CHECK-NEXT: save %sp, -96, %sp +; CHECK-NEXT: sethi 1049856, %o0 +; CHECK-NEXT: call a +; CHECK-NEXT: mov %g0, %o1 +; CHECK-NEXT: ret +; CHECK-NEXT: restore +; +; CHECK-LE-LABEL: test_call: +; CHECK-LE: ! %bb.0: +; CHECK-LE-NEXT: save %sp, -96, %sp +; CHECK-LE-NEXT: sethi 1049856, %o1 +; CHECK-LE-NEXT: call a +; CHECK-LE-NEXT: mov %g0, %o0 +; CHECK-LE-NEXT: ret +; CHECK-LE-NEXT: restore call void @a(double 5.0) ret void } @@ -33,15 +52,29 @@ define void @test_call() { ;; different than a normal function call. This was crashing before, ;; due to an earlier broken workaround for this issue.) -; CHECK-LABEL: test_intrins_call -; CHECK: sethi 1048576, %o0 -; CHECK: mov %g0, %o1 -; CHECK: mov %o0, %o2 -; CHECK: mov %g0, %o3 -; CHECK-LE: sethi 1048576, %o1 -; CHECK-LE: mov %g0, %o0 declare double @llvm.pow.f64(double, double) -define double @test_intrins_call() { +define double @test_intrins_call() nounwind { +; CHECK-LABEL: test_intrins_call: +; CHECK: ! %bb.0: +; CHECK-NEXT: save %sp, -96, %sp +; CHECK-NEXT: sethi 1048576, %o0 +; CHECK-NEXT: mov %g0, %o1 +; CHECK-NEXT: mov %o0, %o2 +; CHECK-NEXT: call pow +; CHECK-NEXT: mov %g0, %o3 +; CHECK-NEXT: ret +; CHECK-NEXT: restore +; +; CHECK-LE-LABEL: test_intrins_call: +; CHECK-LE: ! %bb.0: +; CHECK-LE-NEXT: save %sp, -96, %sp +; CHECK-LE-NEXT: sethi 1048576, %o1 +; CHECK-LE-NEXT: mov %g0, %o0 +; CHECK-LE-NEXT: mov %g0, %o2 +; CHECK-LE-NEXT: call pow +; CHECK-LE-NEXT: mov %o1, %o3 +; CHECK-LE-NEXT: ret +; CHECK-LE-NEXT: restore %1 = call double @llvm.pow.f64(double 2.0, double 2.0) ret double %1 } -- 2.7.4