xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/compare-simm.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32 -mtriple=powerpc-apple-darwin8 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine i32 @test(i32 %x) nounwind {
4*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @test
5*9880d681SAndroid Build Coastguard Worker; CHECK: cmpwi r3, -1
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker        %c = icmp eq i32 %x, -1
8*9880d681SAndroid Build Coastguard Worker	br i1 %c, label %T, label %F
9*9880d681SAndroid Build Coastguard WorkerT:
10*9880d681SAndroid Build Coastguard Worker	%A = call i32 @test(i32 123)
11*9880d681SAndroid Build Coastguard Worker	%B = add i32 %A, 43
12*9880d681SAndroid Build Coastguard Worker	ret i32 %B
13*9880d681SAndroid Build Coastguard WorkerF:
14*9880d681SAndroid Build Coastguard Worker	%G = add i32 %x, 1234
15*9880d681SAndroid Build Coastguard Worker	ret i32 %G
16*9880d681SAndroid Build Coastguard Worker}
17