1 ; RUN: llc -mtriple=arm64-apple-darwin < %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 x[[SUM:[0-9]+]], x0, x1
7 %D = trunc i64 %C to i32
10 ; CHECK: sxtw x[[EXT:[0-9]+]], w[[SUM]]
11 store volatile i64 %F, ptr %P2
13 store volatile i32 %D, ptr %P
14 ; Reuse low bits of extended register, don't extend live range of SUM.