2017-07-27 00:45:57 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2013-09-25 06:50:14 +08:00
|
|
|
; RUN: llc < %s -mtriple=i686-apple-darwin | FileCheck %s
|
|
|
|
; PR17338
|
|
|
|
|
|
|
|
@t1.global = internal global i64 -1, align 8
|
|
|
|
|
|
|
|
define i32 @t1() nounwind ssp {
|
|
|
|
; CHECK-LABEL: t1:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0: ## %entry
|
2017-07-27 00:45:57 +08:00
|
|
|
; CHECK-NEXT: xorl %eax, %eax
|
|
|
|
; CHECK-NEXT: cmpl $0, _t1.global
|
|
|
|
; CHECK-NEXT: setne %al
|
|
|
|
; CHECK-NEXT: retl
|
|
|
|
; CHECK-NEXT: ## -- End function
|
|
|
|
entry:
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load i64, i64* @t1.global, align 8
|
2013-09-25 06:50:14 +08:00
|
|
|
%and = and i64 4294967295, %0
|
|
|
|
%cmp = icmp sgt i64 %and, 0
|
|
|
|
%conv = zext i1 %cmp to i32
|
|
|
|
ret i32 %conv
|
|
|
|
}
|