view test/CodeGen/X86/remat-phys-dead.ll @ 33:e4204d083e25

LLVM 3.5
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 14:32:10 +0900
parents 95c75e76d11b
children 60c9769439b8
line wrap: on
line source

; REQUIRES: asserts
; RUN: llc -mtriple=x86_64-apple-darwin -debug -o /dev/null < %s 2>&1 | FileCheck %s

; We need to make sure that rematerialization into a physical register marks the
; super- or sub-register as dead after this rematerialization since only the
; original register is actually used later. Largely irrelevant for a trivial
; example like this, since EAX is never used again, but easy to test.

define i8 @test_remat() {
  ret i8 0
; CHECK: REGISTER COALESCING
; CHECK: Remat: %EAX<def,dead> = MOV32r0 %EFLAGS<imp-def,dead>, %AL<imp-def>
}

; On the other hand, if it's already the correct width, we really shouldn't be
; marking the definition register as dead.

define i32 @test_remat32() {
  ret i32 0
; CHECK: REGISTER COALESCING
; CHECK: Remat: %EAX<def> = MOV32r0 %EFLAGS<imp-def,dead>
}