[all-commits] [llvm/llvm-project] 3651bc: [AArch64] Optimize cmp chain before legalization

Allen via All-commits all-commits at lists.llvm.org
Wed Nov 23 03:48:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3651bc83b6f28d2ae2d6b32db661f0d62cb600d7
      https://github.com/llvm/llvm-project/commit/3651bc83b6f28d2ae2d6b32db661f0d62cb600d7
  Author: zhongyunde <zhongyunde at huawei.com>
  Date:   2022-11-23 (Wed, 23 Nov 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/atomicrmw-O0.ll
    M llvm/test/CodeGen/AArch64/bcmp.ll
    M llvm/test/CodeGen/AArch64/dag-combine-setcc.ll
    M llvm/test/CodeGen/AArch64/i128-cmp.ll

  Log Message:
  -----------
  [AArch64] Optimize cmp chain before legalization

* For case bcmp9, there is extras AND and EXTEND int the chain of OR/XOR,
  which prevent the transform, so enable the optimize before legalization.

* The key IR frag related:
      t37: i32,ch = load<(load (s8) from %ir.4), anyext from i8> t0, t11, undef:i64
        t12: i64 = add t4, Constant:i64<8>
      t38: i32,ch = load<(load (s8) from %ir.5), anyext from i8> t0, t12, undef:i64
    t39: i32 = xor t37, t38
  t40: i64 = any_extend t39
t42: i64 = and t40, Constant:i64<255>

Depends on D138398 to fix combine_setcc_glue

Reviewed By: dmgreen, bcl5980
Differential Revision: https://reviews.llvm.org/D137936




More information about the All-commits mailing list