[llvm] r277654 - Revert "[ARM] Constant Materialize: imms with specific value can be encoded into mov.w"
Bruno Cardoso Lopes via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 3 14:26:21 PDT 2016
Author: bruno
Date: Wed Aug 3 16:26:21 2016
New Revision: 277654
URL: http://llvm.org/viewvc/llvm-project?rev=277654&view=rev
Log:
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,
Modified:
llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/trunk/test/CodeGen/ARM/subtarget-no-movt.ll
Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=277654&r1=277653&r2=277654&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Wed Aug 3 16:26:21 2016
@@ -476,9 +476,7 @@ bool ARMDAGToDAGISel::isShifterOpProfita
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
Modified: llvm/trunk/test/CodeGen/ARM/subtarget-no-movt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/subtarget-no-movt.ll?rev=277654&r1=277653&r2=277654&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/subtarget-no-movt.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/subtarget-no-movt.ll Wed Aug 3 16:26:21 2016
@@ -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" }
More information about the llvm-commits
mailing list