mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
5a70dd1d82
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
64 lines
2.7 KiB
LLVM
64 lines
2.7 KiB
LLVM
; RUN: llc -mcpu=pwr7 -verify-machineinstrs < %s | FileCheck %s
|
|
target datalayout = "E-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
@.str1 = external unnamed_addr constant [5 x i8], align 1
|
|
@.str10 = external unnamed_addr constant [9 x i8], align 1
|
|
|
|
; Function Attrs: nounwind
|
|
define void @main() #0 {
|
|
; CHECK-LABEL: @main
|
|
; Make sure that the stxvd2x passes -verify-machineinstrs
|
|
; CHECK: stxvd2x
|
|
|
|
entry:
|
|
%0 = tail call <8 x i16> @llvm.ppc.altivec.vupkhsb(<16 x i8> <i8 0, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 0, i8 -1>) #0
|
|
%1 = tail call <8 x i16> @llvm.ppc.altivec.vupklsb(<16 x i8> <i8 0, i8 -1, i8 -1, i8 0, i8 0, i8 0, i8 -1, i8 0, i8 -1, i8 0, i8 0, i8 -1, i8 -1, i8 -1, i8 0, i8 -1>) #0
|
|
br i1 false, label %if.then.i68.i, label %check.exit69.i
|
|
|
|
if.then.i68.i: ; preds = %entry
|
|
unreachable
|
|
|
|
check.exit69.i: ; preds = %entry
|
|
br i1 undef, label %if.then.i63.i, label %check.exit64.i
|
|
|
|
if.then.i63.i: ; preds = %check.exit69.i
|
|
tail call void (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str1, i64 0, i64 0)) #0
|
|
br label %check.exit64.i
|
|
|
|
check.exit64.i: ; preds = %if.then.i63.i, %check.exit69.i
|
|
%2 = tail call i32 @llvm.ppc.altivec.vcmpequh.p(i32 2, <8 x i16> %0, <8 x i16> <i16 0, i16 -1, i16 -1, i16 0, i16 0, i16 0, i16 -1, i16 0>) #0
|
|
%tobool.i55.i = icmp eq i32 %2, 0
|
|
br i1 %tobool.i55.i, label %if.then.i58.i, label %check.exit59.i
|
|
|
|
if.then.i58.i: ; preds = %check.exit64.i
|
|
unreachable
|
|
|
|
check.exit59.i: ; preds = %check.exit64.i
|
|
%3 = tail call i32 @llvm.ppc.altivec.vcmpequh.p(i32 2, <8 x i16> %1, <8 x i16> <i16 -1, i16 0, i16 0, i16 -1, i16 -1, i16 -1, i16 0, i16 -1>) #0
|
|
%tobool.i50.i = icmp eq i32 %3, 0
|
|
br i1 %tobool.i50.i, label %if.then.i53.i, label %check.exit54.i
|
|
|
|
if.then.i53.i: ; preds = %check.exit59.i
|
|
unreachable
|
|
|
|
check.exit54.i: ; preds = %check.exit59.i
|
|
unreachable
|
|
}
|
|
|
|
; Function Attrs: nounwind readnone
|
|
declare <8 x i16> @llvm.ppc.altivec.vupkhsb(<16 x i8>) #1
|
|
|
|
; Function Attrs: nounwind readnone
|
|
declare <8 x i16> @llvm.ppc.altivec.vupklsb(<16 x i8>) #1
|
|
|
|
; Function Attrs: nounwind
|
|
declare void @printf(i8* nocapture readonly, ...) #0
|
|
|
|
; Function Attrs: nounwind readnone
|
|
declare i32 @llvm.ppc.altivec.vcmpequh.p(i32, <8 x i16>, <8 x i16>) #1
|
|
|
|
attributes #0 = { nounwind }
|
|
attributes #1 = { nounwind readnone }
|
|
|