[X86] Don't pass a scale value of 0 to scatter/gather intrinsics. This causes the...
[oota-llvm.git] / test / CodeGen / X86 / constant-hoisting-optnone.ll
1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=generic | FileCheck %s
2 ;
3 ; Verify that pass 'Constant Hoisting' is not run on optnone functions.
4 ; Without optnone, Pass 'Constant Hoisting' would firstly hoist
5 ; constant 0xBEEBEEBEC, and then rebase the other constant
6 ; (i.e. constant 0xBEEBEEBF4) with respect to the previous one.
7 ; With optnone, we check that constants are not coalesced.
8
9 define i64 @constant_hoisting_optnone() #0 {
10 ; CHECK-LABEL: @constant_hoisting_optnone
11 ; CHECK-DAG: movabsq {{.*#+}} imm = 0xBEEBEEBF4
12 ; CHECK-DAG: movabsq {{.*#+}} imm = 0xBEEBEEBEC
13 ; CHECK: ret
14 entry:
15   %0 = load i64, i64* inttoptr (i64 51250129900 to i64*)
16   %1 = load i64, i64* inttoptr (i64 51250129908 to i64*)
17   %2 = add i64 %0, %1
18   ret i64 %2
19 }
20
21 attributes #0 = { optnone noinline }