1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=generic | FileCheck %s
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.
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
15 %0 = load i64, ptr inttoptr (i64 51250129900 to ptr)
16 %1 = load i64, ptr inttoptr (i64 51250129908 to ptr)
21 attributes #0 = { optnone noinline }