Vlad Tsyrklevich | ab016e0 | 2018-08-01 17:44:37 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s | FileCheck %s |
| 2 | ; RUN: llc -relocation-model=pic < %s | FileCheck %s |
| 3 | |
| 4 | ; Regression test for PR38200 |
| 5 | |
| 6 | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 7 | target triple = "x86_64-unknown-linux-gnu" |
| 8 | |
| 9 | @bit_mask8 = external hidden global i8, !absolute_symbol !0 |
| 10 | |
| 11 | declare void @f() |
| 12 | |
| 13 | define void @foo8(i8* %ptr) noinline optnone { |
| 14 | %load = load i8, i8* %ptr |
| 15 | ; CHECK: movl $bit_mask8, %ecx |
| 16 | %and = and i8 %load, ptrtoint (i8* @bit_mask8 to i8) |
| 17 | %icmp = icmp eq i8 %and, 0 |
| 18 | br i1 %icmp, label %t, label %f |
| 19 | |
| 20 | t: |
| 21 | call void @f() |
| 22 | ret void |
| 23 | |
| 24 | f: |
| 25 | ret void |
| 26 | } |
| 27 | |
| 28 | !0 = !{i64 0, i64 256} |