forked from OSchip/llvm-project
Revert "[ARM] Constant Materialize: imms with specific value can be encoded into mov.w"
This reverts commit r277610 / d619aa8878c3dafcc0d29a46517f63ff3209fdd4. This make subtarget-no-movt.ll fail in http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_check/26892, llvm-svn: 277654
This commit is contained in:
parent
e7f912cd8f
commit
3fcf832cce
|
@ -476,9 +476,7 @@ bool ARMDAGToDAGISel::isShifterOpProfitable(const SDValue &Shift,
|
|||
unsigned ARMDAGToDAGISel::ConstantMaterializationCost(unsigned Val) const {
|
||||
if (Subtarget->isThumb()) {
|
||||
if (Val <= 255) return 1; // MOV
|
||||
if (Subtarget->hasV6T2Ops() &&
|
||||
(Val <= 0xffff || ARM_AM::getT2SOImmValSplatVal(Val) != -1))
|
||||
return 1; // MOVW
|
||||
if (Subtarget->hasV6T2Ops() && Val <= 0xffff) return 1; // MOVW
|
||||
if (Val <= 510) return 2; // MOV + ADDi8
|
||||
if (~Val <= 255) return 2; // MOV + MVN
|
||||
if (ARM_AM::isThumbImmShiftedVal(Val)) return 2; // MOV + LSL
|
||||
|
|
|
@ -42,21 +42,4 @@ define i32 @foo1(i32 %a) {
|
|||
ret i32 %1
|
||||
}
|
||||
|
||||
; NO-OPTION-LABEL: {{_?}}foo2
|
||||
; NO-OPTION: mov.w r0, #-536813568
|
||||
; NO-OPTION-LABEL-NOT: .long
|
||||
|
||||
; USE-MOVT-LABEL: {{_?}}foo2
|
||||
; USE-MOVT: mov.w r0, #-536813568
|
||||
; USE-MOVT-NOT: .long
|
||||
|
||||
; NO-USE-MOVT-LABEL: {{_?}}foo2
|
||||
; NO-USE-MOVT: mov.w r0, #-536813568
|
||||
; NO-USE-MOVT-NOT: .long
|
||||
define i32 @foo2() {
|
||||
%1 = load i32, i32* inttoptr (i32 -536813568 to i32*) ; load from 0xe000e000
|
||||
ret i32 %1
|
||||
}
|
||||
|
||||
|
||||
attributes #0 = { "target-features"="+no-movt" }
|
||||
|
|
Loading…
Reference in New Issue