mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 22:28:22 +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
44 lines
1.7 KiB
LLVM
44 lines
1.7 KiB
LLVM
; RUN: llc < %s
|
|
; verify PR 1700 is still fixed
|
|
; ModuleID = 'hh.c'
|
|
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
|
|
target triple = "i686-apple-darwin8"
|
|
|
|
define x86_fp80 @x() {
|
|
entry:
|
|
%retval = alloca x86_fp80, align 16 ; <x86_fp80*> [#uses=2]
|
|
%tmp = alloca x86_fp80, align 16 ; <x86_fp80*> [#uses=2]
|
|
%d = alloca double, align 8 ; <double*> [#uses=2]
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
store double 0.000000e+00, double* %d, align 8
|
|
%tmp1 = load double, double* %d, align 8 ; <double> [#uses=1]
|
|
%tmp12 = fpext double %tmp1 to x86_fp80 ; <x86_fp80> [#uses=1]
|
|
store x86_fp80 %tmp12, x86_fp80* %tmp, align 16
|
|
%tmp3 = load x86_fp80, x86_fp80* %tmp, align 16 ; <x86_fp80> [#uses=1]
|
|
store x86_fp80 %tmp3, x86_fp80* %retval, align 16
|
|
br label %return
|
|
|
|
return: ; preds = %entry
|
|
%retval4 = load x86_fp80, x86_fp80* %retval ; <x86_fp80> [#uses=1]
|
|
ret x86_fp80 %retval4
|
|
}
|
|
|
|
define double @y() {
|
|
entry:
|
|
%retval = alloca double, align 8 ; <double*> [#uses=2]
|
|
%tmp = alloca double, align 8 ; <double*> [#uses=2]
|
|
%ld = alloca x86_fp80, align 16 ; <x86_fp80*> [#uses=2]
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
store x86_fp80 0xK00000000000000000000, x86_fp80* %ld, align 16
|
|
%tmp1 = load x86_fp80, x86_fp80* %ld, align 16 ; <x86_fp80> [#uses=1]
|
|
%tmp12 = fptrunc x86_fp80 %tmp1 to double ; <double> [#uses=1]
|
|
store double %tmp12, double* %tmp, align 8
|
|
%tmp3 = load double, double* %tmp, align 8 ; <double> [#uses=1]
|
|
store double %tmp3, double* %retval, align 8
|
|
br label %return
|
|
|
|
return: ; preds = %entry
|
|
%retval4 = load double, double* %retval ; <double> [#uses=1]
|
|
ret double %retval4
|
|
}
|