[PowerPC] PPC backend optimization to lower int_ppc_tdw/int_ppc_tw intrinsics to...
authorVictor Huang <wei.huang@ibm.com>
Wed, 10 Nov 2021 19:58:36 +0000 (13:58 -0600)
committerVictor Huang <wei.huang@ibm.com>
Thu, 11 Nov 2021 15:52:00 +0000 (09:52 -0600)
commit18fe0a0d9eb1f38e57cbf8d3fde2241e682a8eb6
tree04ee6dd748cc60902a3623ba265c01241abfc5ad
parent72362736c380699a79ba43a1411baeab76205c39
[PowerPC] PPC backend optimization to lower int_ppc_tdw/int_ppc_tw intrinsics to TDI/TWI machine instructions

This patch adds the backend optimization to match XL behavior for the two
builtins __tdw and __tw that when the second input argument is an immediate,
emitting tdi/twi instructions instead of td/tw.

Reviewed By: nemanjai, amyk, PowerPC

Differential revision: https://reviews.llvm.org/D112285
llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-trap-64bit-only.ll
llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-trap.ll