[Thumb1] Any imm8 should have cost of 1
authorZhaoshi Zheng <zhaoshiz@coduaurora.org>
Mon, 24 Sep 2018 16:15:23 +0000 (16:15 +0000)
committerZhaoshi Zheng <zhaoshiz@coduaurora.org>
Mon, 24 Sep 2018 16:15:23 +0000 (16:15 +0000)
commit05b46dc300835ec0aa1193e92d2ccdfb4df752f4
tree1fb1af82d2e6073f9fda4057f18c2e2259fb37ad
parent248319db407d53650369c90be21fbb361b774323
[Thumb1] Any imm8 should have cost of 1

A simple MOVS rd, imm8 can materialize [-128, 127] in signed i8 type or
[0, 255] in unsigned i8 type on Thumb1.

Differential Revision: https://reviews.llvm.org/D52257

llvm-svn: 342898
llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
llvm/test/CodeGen/Thumb/consthoist-imm8-costs-1.ll [new file with mode: 0644]