[all-commits] [llvm/llvm-project] a04b53: [LegalizeIntegerTypes][RISCV] Teach PromoteSetCCOp...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Jan 4 12:39:14 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a04b5325051c906a8a0ddc58fffa1b095e024314
      https://github.com/llvm/llvm-project/commit/a04b5325051c906a8a0ddc58fffa1b095e024314
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/test/CodeGen/RISCV/alu16.ll
    M llvm/test/CodeGen/RISCV/alu8.ll

  Log Message:
  -----------
  [LegalizeIntegerTypes][RISCV] Teach PromoteSetCCOperands to check sign bits of unsigned compares.

Unsigned compares work with either zero extended or sign extended
inputs just like equality comparisons. I didn't allow this when
I refactored the code in D116421 due to lack of tests. But I've
since found a simple C test case that demonstrates when this can be
useful.

Reviewed By: efriedma

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




More information about the All-commits mailing list