X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FX86%2Fjump_sign.ll;h=ca3e8bf71ebab1d10b3008808c3068abb973e038;hb=db0def4a5cb14629257780d48b3c1ac28768f9b1;hp=440f1cc9b49fc8d380989623d04dd79de0d24bbf;hpb=7c9c6ed761bf9d28c0c257a045b35781969136e0;p=oota-llvm.git diff --git a/test/CodeGen/X86/jump_sign.ll b/test/CodeGen/X86/jump_sign.ll index 440f1cc9b49..ca3e8bf71eb 100644 --- a/test/CodeGen/X86/jump_sign.ll +++ b/test/CodeGen/X86/jump_sign.ll @@ -9,11 +9,11 @@ entry: br i1 %tmp, label %cond_true, label %cond_next cond_true: ; preds = %entry - %tmp2 = tail call i32 (...)* @bar( ) ; [#uses=0] + %tmp2 = tail call i32 (...) @bar( ) ; [#uses=0] br label %cond_next cond_next: ; preds = %cond_true, %entry - %tmp3 = tail call i32 (...)* @baz( ) ; [#uses=0] + %tmp3 = tail call i32 (...) @baz( ) ; [#uses=0] ret i32 undef } @@ -217,17 +217,15 @@ entry: ; PR13475 ; If we have sub a, b and cmp b, a and the result of cmp is used ; by sbb, we should not optimize cmp away. -define i32 @func_q(i32 %j.4, i32 %w, i32 %el) { +define i32 @func_q(i32 %a0, i32 %a1, i32 %a2) { ; CHECK-LABEL: func_q: ; CHECK: cmp ; CHECK-NEXT: sbb - %tmp532 = add i32 %j.4, %w - %tmp533 = icmp ugt i32 %tmp532, %el - %tmp534 = icmp ult i32 %w, %el - %or.cond = and i1 %tmp533, %tmp534 - %tmp535 = sub i32 %el, %w - %j.5 = select i1 %or.cond, i32 %tmp535, i32 %j.4 - ret i32 %j.5 + %1 = icmp ult i32 %a0, %a1 + %2 = sub i32 %a1, %a0 + %3 = select i1 %1, i32 -1, i32 0 + %4 = xor i32 %2, %3 + ret i32 %4 } ; rdar://11873276 define i8* @func_r(i8* %base, i32* nocapture %offset, i32 %size) nounwind {