blob: 4d323dac54fafddaeeb7c6caeed8c4aec638608a [file] [log] [blame]
Roman Divacky8e9d6722011-06-20 15:28:39 +00001; Check that the ADDIC optimizations are not applied on PPC64
2; RUN: llc < %s | FileCheck %s
3; ModuleID = 'os_unix.c'
4target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64"
5target triple = "powerpc64-unknown-freebsd9.0"
6
7define i32 @notZero(i32 %call) nounwind {
8entry:
9; CHECK-NOT: addic
10 %not.tobool = icmp ne i32 %call, 0
11 %. = zext i1 %not.tobool to i32
12 ret i32 %.
13}
14
15define i32 @isMinusOne(i32 %call) nounwind {
16entry:
17; CHECK-NOT: addic
18 %not.tobool = icmp eq i32 %call, -1
19 %. = zext i1 %not.tobool to i32
20 ret i32 %.
21}
22
23define i32 @isNotMinusOne(i32 %call) nounwind {
24entry:
25; CHECK-NOT: addic
26 %not.tobool = icmp ne i32 %call, -1
27 %. = zext i1 %not.tobool to i32
28 ret i32 %.
29}