[PATCH] D153502: [DAGCombiner] Change foldAndOrOfSETCC() to optimize and/or patterns

Konstantina Mitropoulou via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 23:12:28 PDT 2023


kmitropoulou marked 3 inline comments as done.
kmitropoulou added a subscriber: ilya.
kmitropoulou added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/zbb-cmp-combine.ll:51-52
 ; CHECK:       # %bb.0:
-; CHECK-NEXT:    minu a1, a1, a2
-; CHECK-NEXT:    sltu a0, a1, a0
+; CHECK-NEXT:    maxu a1, a1, a2
+; CHECK-NEXT:    sltu a0, a0, a1
 ; CHECK-NEXT:    ret
----------------
foad wrote:
> - RISCV was already doing this optimization - where?
> - Your result is different - it uses maxu instead of minu. One of them must be wrong.
@Ilya Andreev: How is this optimization done in RISCV?

I fixed the bug. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153502



More information about the llvm-commits mailing list