comparison test/CodeGen/AArch64/arm64-icmp-opt.ll @ 77:54457678186b LLVM3.6

LLVM 3.6
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Mon, 08 Sep 2014 22:06:00 +0900
parents
children 1172e4bd9c6f
comparison
equal deleted inserted replaced
34:e874dbf0ad9d 77:54457678186b
1 ; RUN: llc < %s -march=arm64 | FileCheck %s
2
3 ; Optimize (x > -1) to (x >= 0) etc.
4 ; Optimize (cmp (add / sub), 0): eliminate the subs used to update flag
5 ; for comparison only
6 ; rdar://10233472
7
8 define i32 @t1(i64 %a) nounwind ssp {
9 entry:
10 ; CHECK-LABEL: t1:
11 ; CHECK-NOT: movn
12 ; CHECK: cmp x0, #0
13 ; CHECK: cset w0, ge
14 %cmp = icmp sgt i64 %a, -1
15 %conv = zext i1 %cmp to i32
16 ret i32 %conv
17 }