[all-commits] [llvm/llvm-project] 317468: [SystemZ] Bugfix and improve the handling of CC v...

Jonas Paulsson via All-commits all-commits at lists.llvm.org
Fri Dec 20 10:22:16 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3174683e21cc5ca9f026549ddbdf14460de0d54f
      https://github.com/llvm/llvm-project/commit/3174683e21cc5ca9f026549ddbdf14460de0d54f
  Author: Jonas Paulsson <paulsson at linux.vnet.ibm.com>
  Date:   2019-12-20 (Fri, 20 Dec 2019)

  Changed paths:
    M llvm/lib/Target/SystemZ/SystemZ.h
    M llvm/lib/Target/SystemZ/SystemZElimCompare.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrFormats.td
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.h
    M llvm/lib/Target/SystemZ/SystemZInstrInfo.td
    M llvm/test/CodeGen/SystemZ/int-cmp-44.ll
    M llvm/test/CodeGen/SystemZ/int-cmp-45.ll
    A llvm/test/CodeGen/SystemZ/int-cmp-56.ll
    A llvm/test/CodeGen/SystemZ/int-cmp-57.ll
    A llvm/test/CodeGen/SystemZ/int-cmp-58.mir

  Log Message:
  -----------
  [SystemZ]  Bugfix and improve the handling of CC values.

It was recently discovered that the handling of CC values was actually broken
since overflow was not properly handled ('nsw' flag not checked for).

Add and sub instructions now have a new target specific instruction flag
named SystemZII::CCIfNoSignedWrap. It means that the CC result can be used
instead of a compare with 0, but only if the instruction has the 'nsw' flag
set.

This patch also adds the improvements of conversion to logical instructions
and the analyzing of add with immediates, to be able to eliminate more
compares.

Review: Ulrich Weigand
https://reviews.llvm.org/D66868




More information about the All-commits mailing list