; RUN: llc < %s %Domain = type { i8*, i32, i32*, i32, i32, i32*, %Domain* } @AConst = constant i32 123 ; [#uses=1] ; Test setting values of different constants in registers. ; define void @testConsts(i32 %N, float %X) { %a = add i32 %N, 1 ; [#uses=0] %i = add i32 %N, 12345678 ; [#uses=0] %b = add i16 4, 3 ; [#uses=0] %c = fadd float %X, 0.000000e+00 ; [#uses=0] %d = fadd float %X, 0x400921CAC0000000 ; [#uses=0] %f = add i32 -1, 10 ; [#uses=0] %g = add i16 20, -1 ; [#uses=0] %j = add i16 -1, 30 ; [#uses=0] %h = add i8 40, -1 ; [#uses=0] %k = add i8 -1, 50 ; [#uses=0] ret void } ; A SetCC whose result is used should produce instructions to ; compute the boolean value in a register. One whose result ; is unused will only generate the condition code but not ; the boolean result. ; define void @unusedBool(i32* %x, i32* %y) { icmp eq i32* %x, %y ; :1 [#uses=1] xor i1 %1, true ; :2 [#uses=0] icmp ne i32* %x, %y ; :3 [#uses=0] ret void } ; A constant argument to a Phi produces a Cast instruction in the ; corresponding predecessor basic block. This checks a few things: ; -- phi arguments coming from the bottom of the same basic block ; (they should not be forward substituted in the machine code!) ; -- code generation for casts of various types ; -- use of immediate fields for integral constants of different sizes ; -- branch on a constant condition ; define void @mergeConstants(i32* %x, i32* %y) { ;