1 ; RUN: llc < %s | FileCheck %s
2 ; RUN: llc -relocation-model=pic < %s | FileCheck %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
5 target triple = "x86_64-unknown-linux-gnu"
7 @align = external hidden global i8, !absolute_symbol !0
11 define void @foo(i64 %val) {
12 %shr = lshr i64 %val, zext (i8 ptrtoint (i8* @align to i8) to i64)
13 %shl = shl i64 %val, zext (i8 sub (i8 64, i8 ptrtoint (i8* @align to i8)) to i64)
14 ; CHECK: rorq $align@ABS8, %rdi
15 %ror = or i64 %shr, %shl
16 %cmp = icmp ult i64 %ror, 109
17 br i1 %cmp, label %t, label %f
27 define void @bar(i64 %val) {
28 %shr = shl i64 %val, zext (i8 ptrtoint (i8* @align to i8) to i64)
29 %shl = lshr i64 %val, zext (i8 sub (i8 64, i8 ptrtoint (i8* @align to i8)) to i64)
30 ; CHECK: rolq $align@ABS8, %rdi
31 %rol = or i64 %shr, %shl
32 %cmp = icmp ult i64 %rol, 109
33 br i1 %cmp, label %t, label %f
43 !0 = !{i64 0, i64 128}