forked from OSchip/llvm-project
[FastISel][ARM] Use MOVT/MOVW if the subtarget requests it.
This change is also in preparation for a future change to make sure that the constant materialization uses MOVT/MOVW when available and not a load from the constant pool. llvm-svn: 215584
This commit is contained in:
parent
2cbcf7aad9
commit
a5b083853c
|
@ -546,6 +546,9 @@ unsigned ARMFastISel::ARMMaterializeInt(const Constant *C, MVT VT) {
|
|||
}
|
||||
}
|
||||
|
||||
if (Subtarget->useMovt(*FuncInfo.MF))
|
||||
return FastEmit_i(VT, VT, ISD::Constant, CI->getZExtValue());
|
||||
|
||||
// Load from constant pool. For now 32-bit only.
|
||||
if (VT != MVT::i32)
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-apple-ios | FileCheck %s --check-prefix=ARM
|
||||
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=armv7-linux-gnueabi | FileCheck %s --check-prefix=ARM
|
||||
; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-apple-ios < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
|
||||
; RUN: llc -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -arm-use-movt=false -mtriple=armv7-linux-gnueabi < %s | FileCheck %s --check-prefix=CHECK --check-prefix=ARM
|
||||
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort -relocation-model=dynamic-no-pic -mtriple=thumbv7-apple-ios | FileCheck %s --check-prefix=THUMB
|
||||
; rdar://10412592
|
||||
|
||||
|
|
Loading…
Reference in New Issue