brintos

brintos / llvm-project-archived public Read only

0
0
Text · 827 B · 9a0a219 Raw
24 lines · plain
1; REQUIRES: asserts2; RUN: llc -verify-machineinstrs -mtriple=x86_64-apple-darwin -debug -o /dev/null < %s 2>&1 | FileCheck %s3 4; We need to make sure that rematerialization into a physical register marks the5; super- or sub-register as dead after this rematerialization since only the6; original register is actually used later. Largely irrelevant for a trivial7; example like this, since eax is never used again, but easy to test.8 9define i8 @test_remat() {10  ret i8 011; CHECK: REGISTER COALESCER12; CHECK: Remat: dead $eax = MOV32r0 implicit-def dead $eflags, implicit-def $al13}14 15; On the other hand, if it's already the correct width, we really shouldn't be16; marking the definition register as dead.17 18define i32 @test_remat32() {19  ret i32 020; CHECK: REGISTER COALESCER21; CHECK: $eax = MOV32r0 implicit-def dead $eflags22}23 24