]> granicus.if.org Git - llvm/commit
[RISCV] Improve codegen for icmp {ne,eq} with a constant
authorLuis Marques <luismarques@lowrisc.org>
Tue, 26 Mar 2019 12:55:00 +0000 (12:55 +0000)
committerLuis Marques <luismarques@lowrisc.org>
Tue, 26 Mar 2019 12:55:00 +0000 (12:55 +0000)
commit11a3b12941681067464e1f09b58b3bb03b30f28e
treebfeee5c01799aa97c8562bbf35b4df905f128c6d
parent3ae58c3794f0b38a8d6282e110ff376bc7bb246e
[RISCV] Improve codegen for icmp {ne,eq} with a constant

Adds two patterns to improve the codegen of GPR value comparisons with small
constants. Instead of first loading the constant into another register and then
doing an XOR of those registers, these patterns directly use the constant as an
XORI immediate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356990 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/RISCV/RISCVInstrInfo.td
test/CodeGen/RISCV/i32-icmp.ll