[PATCH] D101074: [X86] Canonicalize LT/GT compares with constants to use LE/GE to reduce the number of EFLAGs reads. (PR48760)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 17 06:08:46 PDT 2021


RKSimon marked an inline comment as done.
RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/lack-of-signed-truncation-check.ll:601
 ; X86-NEXT:    addl $8, %eax
-; X86-NEXT:    cmpw $15, %ax
-; X86-NEXT:    seta %al
+; X86-NEXT:    cmpw $16, %ax
+; X86-NEXT:    setae %al
----------------
pengfei wrote:
> Is it possible that we happen to exceed IMM16?
No - we check for min/max values before decrementing/incrementing to ensure we don't wrap the value.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101074/new/

https://reviews.llvm.org/D101074



More information about the llvm-commits mailing list