mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-14 23:48:49 +00:00
7c9c6ed761
Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230794 91177308-0d34-0410-b5e6-96231b3b80d8
42 lines
1.1 KiB
LLVM
42 lines
1.1 KiB
LLVM
; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s
|
|
|
|
%umul.ty = type { i32, i1 }
|
|
|
|
define i32 @test1(i32 %a) nounwind {
|
|
; CHECK: test1:
|
|
; CHECK: muldi3
|
|
%tmp0 = tail call %umul.ty @llvm.umul.with.overflow.i32(i32 %a, i32 37)
|
|
%tmp1 = extractvalue %umul.ty %tmp0, 0
|
|
%tmp2 = select i1 undef, i32 -1, i32 %tmp1
|
|
ret i32 %tmp2
|
|
}
|
|
|
|
declare %umul.ty @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
|
|
|
|
define i32 @test2(i32 %argc, i8** %argv) ssp {
|
|
; CHECK: test2:
|
|
; CHECK: str r0
|
|
; CHECK: movs r2
|
|
; CHECK: mov r1
|
|
; CHECK: mov r3
|
|
; CHECK: muldi3
|
|
%1 = alloca i32, align 4
|
|
%2 = alloca i32, align 4
|
|
%3 = alloca i8**, align 4
|
|
%m_degree = alloca i32, align 4
|
|
store i32 0, i32* %1
|
|
store i32 %argc, i32* %2, align 4
|
|
store i8** %argv, i8*** %3, align 4
|
|
store i32 10, i32* %m_degree, align 4
|
|
%4 = load i32, i32* %m_degree, align 4
|
|
%5 = call %umul.ty @llvm.umul.with.overflow.i32(i32 %4, i32 8)
|
|
%6 = extractvalue %umul.ty %5, 1
|
|
%7 = extractvalue %umul.ty %5, 0
|
|
%8 = select i1 %6, i32 -1, i32 %7
|
|
%9 = call noalias i8* @_Znam(i32 %8)
|
|
%10 = bitcast i8* %9 to double*
|
|
ret i32 0
|
|
}
|
|
|
|
declare noalias i8* @_Znam(i32)
|