xref: /llvm-project/llvm/test/CodeGen/Mips/GlobalISel/legalizer/float_constants.mir (revision 48904e9452de81375bd55d830d08e51cc8f2ec7e)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP32
3# RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=FP64
4
5--- |
6
7  define void @e_single_precision() {entry: ret void}
8  define void @e_double_precision() {entry: ret void}
9
10...
11---
12name:            e_single_precision
13alignment:       4
14tracksRegLiveness: true
15body:             |
16  bb.1.entry:
17    ; FP32-LABEL: name: e_single_precision
18    ; FP32: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0x4005BF0A80000000
19    ; FP32: $f0 = COPY [[C]](s32)
20    ; FP32: RetRA implicit $f0
21    ; FP64-LABEL: name: e_single_precision
22    ; FP64: [[C:%[0-9]+]]:_(s32) = G_FCONSTANT float 0x4005BF0A80000000
23    ; FP64: $f0 = COPY [[C]](s32)
24    ; FP64: RetRA implicit $f0
25    %0:_(s32) = G_FCONSTANT float 0x4005BF0A80000000
26    $f0 = COPY %0(s32)
27    RetRA implicit $f0
28
29...
30---
31name:            e_double_precision
32alignment:       4
33tracksRegLiveness: true
34body:             |
35  bb.1.entry:
36    ; FP32-LABEL: name: e_double_precision
37    ; FP32: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4005BF0A8B145769
38    ; FP32: $d0 = COPY [[C]](s64)
39    ; FP32: RetRA implicit $d0
40    ; FP64-LABEL: name: e_double_precision
41    ; FP64: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 0x4005BF0A8B145769
42    ; FP64: $d0 = COPY [[C]](s64)
43    ; FP64: RetRA implicit $d0
44    %0:_(s64) = G_FCONSTANT double 0x4005BF0A8B145769
45    $d0 = COPY %0(s64)
46    RetRA implicit $d0
47
48...
49
50