[VE] Optimize trunc related instructions
authorKazushi (Jam) Marukawa <marukawa@nec.com>
Tue, 4 Aug 2020 07:41:12 +0000 (16:41 +0900)
committerKazushi (Jam) Marukawa <marukawa@nec.com>
Fri, 7 Aug 2020 00:21:05 +0000 (09:21 +0900)
commitf92e0d9384763913a745cbe9c757fbb40691dcd1
tree39a9efaa6033650e82bd9d6a7f679fe54956dc2a
parented5a18fc0399dce994aa354a33e6f981f9828647
[VE] Optimize trunc related instructions

Change to not generate truncate instructions if all use of a truncate
operation don't care about higher bits.  For example, an i32 add
instruction doesn't care about higher 32 bits in 64 bit registers.
Updates regression tests also.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D85418
27 files changed:
llvm/lib/Target/VE/VEISelLowering.cpp
llvm/lib/Target/VE/VEISelLowering.h
llvm/test/CodeGen/VE/addition.ll
llvm/test/CodeGen/VE/bitcast.ll
llvm/test/CodeGen/VE/branch1.ll
llvm/test/CodeGen/VE/bswap.ll
llvm/test/CodeGen/VE/cast.ll
llvm/test/CodeGen/VE/div.ll
llvm/test/CodeGen/VE/int_to_fp.ll
llvm/test/CodeGen/VE/left_shift.ll
llvm/test/CodeGen/VE/max.ll
llvm/test/CodeGen/VE/min.ll
llvm/test/CodeGen/VE/multiply.ll
llvm/test/CodeGen/VE/rem.ll
llvm/test/CodeGen/VE/right_shift.ll
llvm/test/CodeGen/VE/rotl.ll
llvm/test/CodeGen/VE/rotr.ll
llvm/test/CodeGen/VE/select.ll
llvm/test/CodeGen/VE/selectccf32c.ll
llvm/test/CodeGen/VE/selectccf64c.ll
llvm/test/CodeGen/VE/selectcci32.ll
llvm/test/CodeGen/VE/selectcci32c.ll
llvm/test/CodeGen/VE/selectcci32i.ll
llvm/test/CodeGen/VE/selectcci64c.ll
llvm/test/CodeGen/VE/setcci32.ll
llvm/test/CodeGen/VE/setcci32i.ll
llvm/test/CodeGen/VE/subtraction.ll