1*f4a2713aSLionel Sambuc; RUN: llc < %s | FileCheck %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc; Codegen shouldn't reduce the comparison down to testb $-1, %al 4*f4a2713aSLionel Sambuc; because that changes the result of the signed test. 5*f4a2713aSLionel Sambuc; PR5132 6*f4a2713aSLionel Sambuc; CHECK: testw $255, %ax 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuctarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" 9*f4a2713aSLionel Sambuctarget triple = "i386-apple-darwin10.0" 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc@g_14 = global i8 -6, align 1 ; <i8*> [#uses=1] 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambucdeclare i32 @func_16(i8 signext %p_19, i32 %p_20) nounwind 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambucdefine i32 @func_35(i64 %p_38) nounwind ssp { 16*f4a2713aSLionel Sambucentry: 17*f4a2713aSLionel Sambuc %tmp = load i8* @g_14 ; <i8> [#uses=2] 18*f4a2713aSLionel Sambuc %conv = zext i8 %tmp to i32 ; <i32> [#uses=1] 19*f4a2713aSLionel Sambuc %cmp = icmp sle i32 1, %conv ; <i1> [#uses=1] 20*f4a2713aSLionel Sambuc %conv2 = zext i1 %cmp to i32 ; <i32> [#uses=1] 21*f4a2713aSLionel Sambuc %call = call i32 @func_16(i8 signext %tmp, i32 %conv2) ssp ; <i32> [#uses=1] 22*f4a2713aSLionel Sambuc ret i32 1 23*f4a2713aSLionel Sambuc} 24