1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
llvm-mirror/test/CodeGen/X86/compare-global.ll
Peter Collingbourne 53c709eaaf Re-apply r286384, "X86: Introduce the "relocImm" ComplexPattern, which represents a relocatable immediate.", with a fix for 32-bit x86.
Teach X86InstrInfo::analyzeCompare() not to crash on CMP and SUB instructions
that take a global address operand.

llvm-svn: 286420
2016-11-09 23:53:43 +00:00

23 lines
404 B
LLVM

; RUN: llc -o - %s | FileCheck %s
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc18.0.0"
@foo = external global i8
define void @f(i8* %c) {
entry:
; CHECK: subl $_foo, %eax
%cmp = icmp eq i8* %c, @foo
br i1 %cmp, label %if.then, label %if.end
if.then:
tail call void @g()
br label %if.end
if.end:
ret void
}
declare void @g()