mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +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
33 lines
836 B
LLVM
33 lines
836 B
LLVM
; RUN: opt < %s -loop-reduce | llvm-dis
|
|
; PR3399
|
|
|
|
@g_53 = external global i32 ; <i32*> [#uses=1]
|
|
|
|
define i32 @foo() nounwind {
|
|
bb5.thread:
|
|
br label %bb
|
|
|
|
bb: ; preds = %bb5, %bb5.thread
|
|
%indvar = phi i32 [ 0, %bb5.thread ], [ %indvar.next, %bb5 ] ; <i32> [#uses=2]
|
|
br i1 false, label %bb5, label %bb1
|
|
|
|
bb1: ; preds = %bb
|
|
%l_2.0.reg2mem.0 = sub i32 0, %indvar ; <i32> [#uses=1]
|
|
%0 = load volatile i32, i32* @g_53, align 4 ; <i32> [#uses=1]
|
|
%1 = trunc i32 %l_2.0.reg2mem.0 to i16 ; <i16> [#uses=1]
|
|
%2 = trunc i32 %0 to i16 ; <i16> [#uses=1]
|
|
%3 = mul i16 %2, %1 ; <i16> [#uses=1]
|
|
%4 = icmp eq i16 %3, 0 ; <i1> [#uses=1]
|
|
br i1 %4, label %bb7, label %bb2
|
|
|
|
bb2: ; preds = %bb2, %bb1
|
|
br label %bb2
|
|
|
|
bb5: ; preds = %bb
|
|
%indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
|
|
br label %bb
|
|
|
|
bb7: ; preds = %bb1
|
|
ret i32 1
|
|
}
|