{"push_id":872192308,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"da754b50159075802dc8ecf6e799468bcd8f6424","before":"d19cbfed93dfe8ac34c6ee39104611254b31bddb","commits":[{"sha":"086b179985b193f50250faf475a47d7f3e6e4783","author":{"email":"8800578b51f022c8d8adb9606a8b3db4fedbdac6@hanshq.net","name":"Hans Wennborg"},"message":"X86: More efficient legalization of wide integer compares\n\nIn particular, this makes the code for 64-bit compares on 32-bit targets\nmuch more efficient.\n\nExample:\n\n  define i32 @test_slt(i64 %a, i64 %b) {\n  entry:\n    %cmp = icmp slt i64 %a, %b\n    br i1 %cmp, label %bb1, label %bb2\n  bb1:\n    ret i32 1\n  bb2:\n    ret i32 2\n  }\n\nBefore this patch:\n\n  test_slt:\n          movl    4(%esp), %eax\n          movl    8(%esp), %ecx\n          cmpl    12(%esp), %eax\n          setae   %al\n          cmpl    16(%esp), %ecx\n          setge   %cl\n          je      .LBB2_2\n          movb    %cl, %al\n  .LBB2_2:\n          testb   %al, %al\n          jne     .LBB2_4\n          movl    $1, %eax\n          retl\n  .LBB2_4:\n          movl    $2, %eax\n          retl\n\nAfter this patch:\n\n  test_slt:\n          movl    4(%esp), %eax\n          movl    8(%esp), %ecx\n          cmpl    12(%esp), %eax\n          sbbl    16(%esp), %ecx\n          jge     .LBB1_2\n          movl    $1, %eax\n          retl\n  .LBB1_2:\n          movl    $2, %eax\n          retl\n\nDifferential Revision: http://reviews.llvm.org/D14496\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253572 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-mirror/llvm/commits/086b179985b193f50250faf475a47d7f3e6e4783"},{"sha":"da754b50159075802dc8ecf6e799468bcd8f6424","author":{"email":"4a8dfeb3a1c6b90c15fd5a5a91e8e25ea46ffe0b@rotateright.com","name":"Sanjay Patel"},"message":"[CGP] despeculate expensive cttz/ctlz intrinsics\n\nThis is another step towards allowing SimplifyCFG to speculate harder, but then have \nCGP clean things up if the target doesn't like it.\n\nPrevious patches in this series:\nhttp://reviews.llvm.org/D12882\nhttp://reviews.llvm.org/D13297\n\nD13297 should catch most expensive ops, but speculation of cttz/ctlz requires special\nhandling because of weirdness in the intrinsic definition for handling a zero input \n(that definition can probably be blamed on x86).\n\nFor example, if we have the usual speculated-by-select expensive op pattern like this:\n\n  %tobool = icmp eq i64 %A, 0\n  %0 = tail call i64 @llvm.cttz.i64(i64 %A, i1 true)   ; is_zero_undef == true\n  %cond = select i1 %tobool, i64 64, i64 %0\n  ret i64 %cond\n\nThere's an instcombine that will turn it into:\n\n  %0 = tail call i64 @llvm.cttz.i64(i64 %A, i1 false)   ; is_zero_undef == false\n\nThis CGP patch is looking for that case and despeculating it back into:\n\n  entry:\n    %tobool = icmp eq i64 %A, 0\n    br i1 %tobool, label %cond.end, label %cond.true\n\n  cond.true:\n    %0 = tail call i64 @llvm.cttz.i64(i64 %A, i1 true)    ; is_zero_undef == true\n    br label %cond.end\n\n  cond.end:\n    %cond = phi i64 [ %0, %cond.true ], [ 64, %entry ]\n    ret i64 %cond\n\nThis unfortunately may lead to poorer codegen (see the changes in the existing x86 test), \nbut if we increase speculation in SimplifyCFG (the next step in this patch series), then\nwe should avoid those kinds of cases in the first place.\n\nThe need for this patch was originally mentioned here:\nhttp://reviews.llvm.org/D7506\nwith follow-up here:\nhttp://reviews.llvm.org/D7554\n\nDifferential Revision: http://reviews.llvm.org/D14630\n\n\n\ngit-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253573 91177308-0d34-0410-b5e6-96231b3b80d8","distinct":true,"url":"https://api.github.com/repos/llvm-mirror/llvm/commits/da754b50159075802dc8ecf6e799468bcd8f6424"}]}