llvm.org GIT mirror llvm / 735eff8
[ARM GlobalISel] Map G_FCONSTANT git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358061 91177308-0d34-0410-b5e6-96231b3b80d8 Diana Picus 9 months ago
2 changed file(s) with 47 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
335335 &ARM::ValueMappings[ARM::GPR3OpsIdx]});
336336 break;
337337 }
338 case G_FCONSTANT: {
339 LLT Ty = MRI.getType(MI.getOperand(0).getReg());
340 OperandsMapping = getOperandsMapping(
341 {Ty.getSizeInBits() == 64 ? &ARM::ValueMappings[ARM::DPR3OpsIdx]
342 : &ARM::ValueMappings[ARM::SPR3OpsIdx],
343 nullptr});
344 break;
345 }
338346 case G_CONSTANT:
339347 case G_FRAME_INDEX:
340348 case G_GLOBAL_VALUE:
6969
7070 define void @test_fpext_s32_to_s64() #0 { ret void }
7171 define void @test_fptrunc_s64_to_s32() #0 { ret void }
72
73 define void @test_fpconst_s32() #0 { ret void }
74 define void @test_fpconst_s64() #0 { ret void }
7275
7376 define void @test_fptosi_s32() #0 { ret void }
7477 define void @test_fptosi_s64() #0 { ret void }
12861289 BX_RET 14, $noreg, implicit $s0
12871290 ...
12881291 ---
1292 name: test_fpconst_s32
1293 # CHECK-LABEL: name: test_fpconst_s32
1294 legalized: true
1295 regBankSelected: false
1296 selected: false
1297 # CHECK: registers:
1298 # CHECK: - { id: 0, class: fprb, preferred-register: '' }
1299 registers:
1300 - { id: 0, class: _ }
1301 body: |
1302 bb.0:
1303 liveins:
1304
1305 %0(s32) = G_FCONSTANT float -1.25
1306 $s0 = COPY %0(s32)
1307 BX_RET 14, $noreg, implicit $s0
1308 ...
1309 ---
1310 name: test_fpconst_s64
1311 # CHECK-LABEL: name: test_fpconst_s64
1312 legalized: true
1313 regBankSelected: false
1314 selected: false
1315 # CHECK: registers:
1316 # CHECK: - { id: 0, class: fprb, preferred-register: '' }
1317 registers:
1318 - { id: 0, class: _ }
1319 body: |
1320 bb.0:
1321 liveins:
1322
1323 %0(s64) = G_FCONSTANT double -2.4
1324 $d0 = COPY %0(s64)
1325 BX_RET 14, $noreg, implicit $d0
1326 ...
1327 ---
12891328 name: test_fptosi_s32
12901329 # CHECK-LABEL: name: test_fptosi_s32
12911330 legalized: true