aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WasmObjectFile.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2021-07-19 08:31:16 -0700
committerCraig Topper <craig.topper@sifive.com>2021-07-19 09:25:28 -0700
commit50302feb1d2cce4a9fee38621cc7596b3c66ff02 (patch)
tree7ab5f10ee72daa8610edcf568b7887f6b682c600 /llvm/lib/Object/WasmObjectFile.cpp
parent9c49195330d75b669048cdb3c522ac17249addeb (diff)
downloadllvm-50302feb1d2cce4a9fee38621cc7596b3c66ff02.zip
llvm-50302feb1d2cce4a9fee38621cc7596b3c66ff02.tar.gz
llvm-50302feb1d2cce4a9fee38621cc7596b3c66ff02.tar.bz2
[SelectionDAG][RISCV] Use isSExtCheaperThanZExt to control whether sext or zext is used for constant folding any_extend.
RISCV would prefer a sign extended constant since that works better with our constant materialization. We have an existing TLI hook we use to control sign extension of setcc operands in type legalization. That hook happens to do the right check we need here, but might be straying from its original purpose. With only RISCV defining this hook in tree, I wasn't sure if it was worth adding another hook with identical behavior. This is an alternative to D105785 where I tried to handle this in the RISCV backend by not creating ANY_EXTENDs in some places. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D105918
Diffstat (limited to 'llvm/lib/Object/WasmObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions