1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s 2 3 ; Test using an integer literal constant. 4 ; Generated ASM should be: 5 ; ADD_INT KC0[2].Z literal.x, 5 6 ; or 7 ; ADD_INT literal.x KC0[2].Z, 5 8 9 ; CHECK: @i32_literal 10 ; CHECK: ADD_INT * T{{[0-9]\.[XYZW]}}, KC0[2].Z, literal.x 11 ; CHECK-NEXT: 5 12 define void @i32_literal(i32 addrspace(1)* %out, i32 %in) { 13 entry: 14 %0 = add i32 5, %in 15 store i32 %0, i32 addrspace(1)* %out 16 ret void 17 } 18 19 ; Test using a float literal constant. 20 ; Generated ASM should be: 21 ; ADD KC0[2].Z literal.x, 5.0 22 ; or 23 ; ADD literal.x KC0[2].Z, 5.0 24 25 ; CHECK: @float_literal 26 ; CHECK: ADD * T{{[0-9]\.[XYZW]}}, KC0[2].Z, literal.x 27 ; CHECK-NEXT: 1084227584(5.0 28 define void @float_literal(float addrspace(1)* %out, float %in) { 29 entry: 30 %0 = fadd float 5.0, %in 31 store float %0, float addrspace(1)* %out 32 ret void 33 } 34