1 ; RUN: llc -verify-machineinstrs -mcpu=g5 -mtriple=powerpc64-unknown-linux-gnu -ppc-asm-full-reg-names < %s | FileCheck %s
2 ; Check that the peephole optimizer knows about sext and zext instructions.
4 define i32 @test1sext(i64 %A, i64 %B, ptr %P, ptr %P2) nounwind {
6 ; CHECK: add [[SUM:r[0-9]+]], r3, r4
7 %D = trunc i64 %C to i32
10 ; CHECK: extsw [[EXT:r[0-9]+]], [[SUM]]
11 store volatile i64 %F, ptr %P2
12 ; CHECK-DAG: std [[EXT]]
13 store volatile i32 %D, ptr %P
14 ; Reuse low bits of extended register, don't extend live range of SUM.
15 ; CHECK-DAG: stw [[SUM]]