1; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - | FileCheck -check-prefix=NO-OPTION %s 2; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=-no-movt | FileCheck -check-prefix=USE-MOVT %s 3; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -mattr=+no-movt | FileCheck -check-prefix=NO-USE-MOVT %s 4; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 | FileCheck -check-prefix=NO-OPTION-O0 %s 5; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=-no-movt | FileCheck -check-prefix=USE-MOVT-O0 %s 6; RUN: llc -mcpu=cortex-a8 -relocation-model=static %s -o - -O0 -mattr=+no-movt | FileCheck -check-prefix=NO-USE-MOVT-O0 %s 7 8target triple = "thumb-apple-darwin" 9 10; NO-OPTION-LABEL: {{_?}}foo0 11; NO-OPTION: ldr [[R0:r[0-9]+]], [[L0:.*]] 12; NO-OPTION: [[L0]]: 13; NO-OPTION: .long 2296237089 14 15; NO-OPTION-O0-LABEL: {{_?}}foo0 16; NO-OPTION-O0: ldr [[R0:r[0-9]+]], [[L0:.*]] 17; NO-OPTION-O0: [[L0]]: 18; NO-OPTION-O0: .long 2296237089 19 20; USE-MOVT-LABEL: {{_?}}foo0 21; USE-MOVT: movw [[R0:r[0-9]+]], #52257 22; USE-MOVT: movt [[R0]], #35037 23 24; USE-MOVT-O0-LABEL: {{_?}}foo0 25; USE-MOVT-O0: movw [[R0:r[0-9]+]], #52257 26; USE-MOVT-O0: movt [[R0]], #35037 27 28; NO-USE-MOVT-LABEL: {{_?}}foo0 29; NO-USE-MOVT: ldr [[R0:r[0-9]+]], [[L0:.*]] 30; NO-USE-MOVT: [[L0]]: 31; NO-USE-MOVT: .long 2296237089 32 33; NO-USE-MOVT-O0-LABEL: {{_?}}foo0 34; NO-USE-MOVT-O0: ldr [[R0:r[0-9]+]], [[L0:.*]] 35; NO-USE-MOVT-O0: [[L0]]: 36; NO-USE-MOVT-O0: .long 2296237089 37 38define i32 @foo0(i32 %a) #0 { 39 %1 = xor i32 -1998730207, %a 40 ret i32 %1 41} 42 43; NO-OPTION-LABEL: {{_?}}foo1 44; NO-OPTION: movw [[R0:r[0-9]+]], #52257 45; NO-OPTION: movt [[R0]], #35037 46 47; NO-OPTION-O0-LABEL: {{_?}}foo1 48; NO-OPTION-O0: movw [[R0:r[0-9]+]], #52257 49; NO-OPTION-O0: movt [[R0]], #35037 50 51; USE-MOVT-LABEL: {{_?}}foo1 52; USE-MOVT: movw [[R0:r[0-9]+]], #52257 53; USE-MOVT: movt [[R0]], #35037 54 55; USE-MOVT-O0-LABEL: {{_?}}foo1 56; USE-MOVT-O0: movw [[R0:r[0-9]+]], #52257 57; USE-MOVT-O0: movt [[R0]], #35037 58 59; NO-USE-MOVT-LABEL: {{_?}}foo1 60; NO-USE-MOVT: ldr [[R0:r[0-9]+]], [[L0:.*]] 61; NO-USE-MOVT: [[L0]]: 62; NO-USE-MOVT: .long 2296237089 63 64; NO-USE-MOVT-O0-LABEL: {{_?}}foo1 65; NO-USE-MOVT-O0: ldr [[R0:r[0-9]+]], [[L0:.*]] 66; NO-USE-MOVT-O0: [[L0]]: 67; NO-USE-MOVT-O0: .long 2296237089 68 69define i32 @foo1(i32 %a) { 70 %1 = xor i32 -1998730207, %a 71 ret i32 %1 72} 73 74; NO-OPTION-LABEL: {{_?}}foo2 75; NO-OPTION: mov.w [[R0:r[0-9]+]], #-536813568 76 77; USE-MOVT-LABEL: {{_?}}foo2 78; USE-MOVT: mov.w [[R0:r[0-9]+]], #-536813568 79 80; NO-USE-MOVT-LABEL: {{_?}}foo2 81; NO-USE-MOVT: mov.w [[R0:r[0-9]+]], #-536813568 82 83; NO-OPTION-O0-LABEL: {{_?}}foo2 84; NO-OPTION-O0: movw [[R0:r[0-9]+]], #57344 85; NO-OPTION-O0: movt [[R0]], #57344 86 87; USE-MOVT-O0-LABEL: {{_?}}foo2 88; USE-MOVT-O0: movw [[R0:r[0-9]+]], #57344 89; USE-MOVTT-O0: movt [[R0]], #57344 90 91; NO-USE-MOVT-O0-LABEL: {{_?}}foo2 92; NO-USE-MOVT-O0: ldr [[R0:r[0-9]+]], [[L0:.*]] 93; NO-USE-MOVT-O0: [[L0]]: 94; NO-USE-MOVT-O0: .long 3758153728 @ 0xe000e000 95define i32 @foo2() { 96 %1 = load i32, i32* inttoptr (i32 -536813568 to i32*) ; load from 0xe000e000 97 ret i32 %1 98} 99attributes #0 = { "target-features"="+no-movt" } 100