[PATCH] D29587: [DAGCombiner] mulhi + 1 never overflow.

Amaury SECHET via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 15:10:30 PST 2017


deadalnix added inline comments.


================
Comment at: test/CodeGen/X86/overflow.ll:38
 ; X64:       # BB#0:
-; X64-NEXT:    movq %rdx, %rcx
-; X64-NEXT:    movq %rdi, %rax
-; X64-NEXT:    mulq %rsi
-; X64-NEXT:    andl $1, %ecx
-; X64-NEXT:    addq %rdx, %rcx
-; X64-NEXT:    setb %al
+; X64-NEXT:    xorl %eax, %eax
 ; X64-NEXT:    retq
----------------
efriedma wrote:
> Maybe change this test to return %7 rather than just one bit of the high half of %7, so the code isn't completely dead?  Not really important.
The code is dead either way, we shift right to get the carry.


https://reviews.llvm.org/D29587





More information about the llvm-commits mailing list