brintos

brintos / llvm-project-archived public Read only

0
0
Text · 786 B · 777f965 Raw
22 lines · plain
1; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=generic | FileCheck %s2;3; Verify that pass 'Constant Hoisting' is not run on optnone functions.4; Without optnone, Pass 'Constant Hoisting' would firstly hoist5; constant 0xBEEBEEBEC, and then rebase the other constant6; (i.e. constant 0xBEEBEEBF4) with respect to the previous one.7; With optnone, we check that constants are not coalesced.8 9define i64 @constant_hoisting_optnone() #0 {10; CHECK-LABEL: @constant_hoisting_optnone11; CHECK-DAG: movabsq {{.*#+}} imm = 0xBEEBEEBF412; CHECK-DAG: movabsq {{.*#+}} imm = 0xBEEBEEBEC13; CHECK: ret14entry:15  %0 = load i64, ptr inttoptr (i64 51250129900 to ptr)16  %1 = load i64, ptr inttoptr (i64 51250129908 to ptr)17  %2 = add i64 %0, %118  ret i64 %219}20 21attributes #0 = { optnone noinline }22