llvm-6502/test/CodeGen/X86/discontiguous-loops.ll
David Blaikie 5a70dd1d82 [opaque pointer type] Add textual IR support for explicit type parameter to gep operator
Similar to gep (r230786) and load (r230794) changes.

Similar migration script can be used to update test cases, which
successfully migrated all of LLVM and Polly, but about 4 test cases
needed manually changes in Clang.

(this script will read the contents of stdin and massage it into stdout
- wrap it in the 'apply.sh' script shown in previous commits + xargs to
apply it over a large set of test cases)

import fileinput
import sys
import re

rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL)

def conv(match):
  line = match.group(1)
  line += match.group(4)
  line += ", "
  line += match.group(2)
  return line

line = sys.stdin.read()
off = 0
for match in re.finditer(rep, line):
  sys.stdout.write(line[off:match.start()])
  sys.stdout.write(conv(match))
  off = match.end()
sys.stdout.write(line[off:])

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232184 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-13 18:20:45 +00:00

73 lines
2.4 KiB
LLVM

; RUN: llc -verify-loop-info -verify-dom-info -march=x86-64 < %s
; PR5243
@.str96 = external constant [37 x i8], align 8 ; <[37 x i8]*> [#uses=1]
define void @foo() nounwind {
bb:
br label %ybb1
ybb1: ; preds = %yybb13, %xbb6, %bb
switch i32 undef, label %bb18 [
i32 150, label %ybb2
i32 151, label %bb17
i32 152, label %bb19
i32 157, label %ybb8
]
ybb2: ; preds = %ybb1
%tmp = icmp eq i8** undef, null ; <i1> [#uses=1]
br i1 %tmp, label %bb3, label %xbb6
bb3: ; preds = %ybb2
unreachable
xbb4: ; preds = %xbb6
store i32 0, i32* undef, align 8
br i1 undef, label %xbb6, label %bb5
bb5: ; preds = %xbb4
call fastcc void @decl_mode_check_failed() nounwind
unreachable
xbb6: ; preds = %xbb4, %ybb2
%tmp7 = icmp slt i32 undef, 0 ; <i1> [#uses=1]
br i1 %tmp7, label %xbb4, label %ybb1
ybb8: ; preds = %ybb1
%tmp9 = icmp eq i8** undef, null ; <i1> [#uses=1]
br i1 %tmp9, label %bb10, label %ybb12
bb10: ; preds = %ybb8
%tmp11 = load i8*, i8** undef, align 8 ; <i8*> [#uses=1]
call void (i8*, ...)* @fatal(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str96, i64 0, i64 0), i8* %tmp11) nounwind
unreachable
ybb12: ; preds = %ybb8
br i1 undef, label %bb15, label %ybb13
ybb13: ; preds = %ybb12
%tmp14 = icmp sgt i32 undef, 0 ; <i1> [#uses=1]
br i1 %tmp14, label %bb16, label %ybb1
bb15: ; preds = %ybb12
call void (i8*, ...)* @fatal(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str96, i64 0, i64 0), i8* undef) nounwind
unreachable
bb16: ; preds = %ybb13
unreachable
bb17: ; preds = %ybb1
unreachable
bb18: ; preds = %ybb1
unreachable
bb19: ; preds = %ybb1
unreachable
}
declare void @fatal(i8*, ...)
declare fastcc void @decl_mode_check_failed() nounwind