[all-commits] [llvm/llvm-project] 80f974: [AArch64][GlobalISel] Use ZExtValue for zext(xor) ...

Guo-Peilin via All-commits all-commits at lists.llvm.org
Tue Sep 21 09:15:30 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 80f974e40f81348b1676247e832287da29dd02dd
      https://github.com/llvm/llvm-project/commit/80f974e40f81348b1676247e832287da29dd02dd
  Author: guopeilin <guopeilin1 at huawei.com>
  Date:   2021-09-21 (Tue, 21 Sep 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/opt-fold-xor-tbz-tbnz.mir

  Log Message:
  -----------
  [AArch64][GlobalISel] Use ZExtValue for zext(xor) when invert tb(n)z

Currently, we use SExtValue to decide whether to invert tbz or tbnz.
However, for the case zext (xor x, c), we should use ZExt rather
than SExt otherwise we will generate totally opposite branches.

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D108755

(cherry picked from commit 5f48c144c58f6d23e850a1978a6fe05887103b17)




More information about the All-commits mailing list