[RISCV] Allow conversion of CC logic to bitwise logic
authorAlex Bradbury <asb@lowrisc.org>
Fri, 22 Mar 2019 10:39:22 +0000 (10:39 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Fri, 22 Mar 2019 10:39:22 +0000 (10:39 +0000)
commit336910115867420e3fa33628da8dde56c33a9466
tree626bafd4c0e445aa2aebd4258f6fa2262245eea8
parent1ed6a745db37159bc0015402fc868bbcac1780f1
[RISCV] Allow conversion of CC logic to bitwise logic

Indicates in the TargetLowering interface that conversions from CC logic to
bitwise logic are allowed. Adds tests that show the benefit when optimization
opportunities are detected. Also adds tests that show that when the optimization
is not applied correct code is generated (but opportunities for other
optimizations remain).

Differential Revision: https://reviews.llvm.org/D59596
Patch by Luís Marques.

llvm-svn: 356740
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/test/CodeGen/RISCV/setcc-logic.ll [new file with mode: 0644]