[PATCH] D29587: [DAGCombiner] mulhi + 1 never overflow.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 14:59:15 PST 2017
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM.
================
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
----------------
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.
https://reviews.llvm.org/D29587
More information about the llvm-commits
mailing list