mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 23:20:54 +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
36 lines
1.3 KiB
LLVM
36 lines
1.3 KiB
LLVM
; RUN: llc < %s
|
|
|
|
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32"
|
|
target triple = "thumbv6t2-elf"
|
|
%struct.dwarf_cie = type <{ i32, i32, i8, [0 x i8], [3 x i8] }>
|
|
|
|
declare i8* @read_sleb128(i8*, i32* nocapture) nounwind
|
|
|
|
define i32 @get_cie_encoding(%struct.dwarf_cie* %cie) nounwind {
|
|
entry:
|
|
br i1 undef, label %bb1, label %bb13
|
|
|
|
bb1: ; preds = %entry
|
|
%tmp38 = add i32 undef, 10 ; <i32> [#uses=1]
|
|
br label %bb.i
|
|
|
|
bb.i: ; preds = %bb.i, %bb1
|
|
%indvar.i = phi i32 [ 0, %bb1 ], [ %2, %bb.i ] ; <i32> [#uses=3]
|
|
%tmp39 = add i32 %indvar.i, %tmp38 ; <i32> [#uses=1]
|
|
%p_addr.0.i = getelementptr i8, i8* undef, i32 %tmp39 ; <i8*> [#uses=1]
|
|
%0 = load i8, i8* %p_addr.0.i, align 1 ; <i8> [#uses=1]
|
|
%1 = icmp slt i8 %0, 0 ; <i1> [#uses=1]
|
|
%2 = add i32 %indvar.i, 1 ; <i32> [#uses=1]
|
|
br i1 %1, label %bb.i, label %read_uleb128.exit
|
|
|
|
read_uleb128.exit: ; preds = %bb.i
|
|
%.sum40 = add i32 %indvar.i, undef ; <i32> [#uses=1]
|
|
%.sum31 = add i32 %.sum40, 2 ; <i32> [#uses=1]
|
|
%scevgep.i = getelementptr %struct.dwarf_cie, %struct.dwarf_cie* %cie, i32 0, i32 3, i32 %.sum31 ; <i8*> [#uses=1]
|
|
%3 = call i8* @read_sleb128(i8* %scevgep.i, i32* undef) ; <i8*> [#uses=0]
|
|
unreachable
|
|
|
|
bb13: ; preds = %entry
|
|
ret i32 0
|
|
}
|