[PATCH] D60020: [DAGCombiner][X86] Canonicalize SSUBO with immediate RHS to SADDO by negating the immediate.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 16:49:57 PDT 2019
craig.topper marked an inline comment as done.
craig.topper added inline comments.
================
Comment at: llvm/test/CodeGen/X86/sub-with-overflow.ll:86
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: cmpl $1, {{[0-9]+}}(%esp)
+; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
+; CHECK-NEXT: decl %eax
----------------
This is somewhat a regression, but we now generate the code we would get from sadd.with.overflow.i32 with an immediate of -1. So we probably need a more complete canonicalization to icmp when the data result isn't used.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60020/new/
https://reviews.llvm.org/D60020
More information about the llvm-commits
mailing list