mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
39f4e8d9cc
This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186268 91177308-0d34-0410-b5e6-96231b3b80d8
71 lines
1.3 KiB
LLVM
71 lines
1.3 KiB
LLVM
; RUN: opt < %s -instcombine -S | FileCheck %s
|
|
|
|
; CHECK-LABEL: @a(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
define <4 x i32> @a(<1 x i64> %y) {
|
|
%c = bitcast <2 x i64> <i64 0, i64 0> to <4 x i32>
|
|
ret <4 x i32> %c
|
|
}
|
|
|
|
; CHECK-LABEL: @b(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
|
|
define <4 x i32> @b(<1 x i64> %y) {
|
|
%c = bitcast <2 x i64> <i64 -1, i64 -1> to <4 x i32>
|
|
ret <4 x i32> %c
|
|
}
|
|
|
|
; CHECK-LABEL: @foo(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
|
|
; from MultiSource/Benchmarks/Bullet
|
|
define <2 x float> @foo() {
|
|
%cast = bitcast i64 -1 to <2 x float>
|
|
ret <2 x float> %cast
|
|
}
|
|
|
|
|
|
; CHECK-LABEL: @foo2(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
define <2 x double> @foo2() {
|
|
%cast = bitcast i128 -1 to <2 x double>
|
|
ret <2 x double> %cast
|
|
}
|
|
|
|
; CHECK-LABEL: @foo3(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
define <1 x float> @foo3() {
|
|
%cast = bitcast i32 -1 to <1 x float>
|
|
ret <1 x float> %cast
|
|
}
|
|
|
|
; CHECK-LABEL: @foo4(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
define float @foo4() {
|
|
%cast = bitcast <1 x i32 ><i32 -1> to float
|
|
ret float %cast
|
|
}
|
|
|
|
; CHECK-LABEL: @foo5(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
define double @foo5() {
|
|
%cast = bitcast <2 x i32 ><i32 -1, i32 -1> to double
|
|
ret double %cast
|
|
}
|
|
|
|
|
|
; CHECK-LABEL: @foo6(
|
|
; CHECK-NOT: bitcast
|
|
; CHECK: ret
|
|
define <2 x double> @foo6() {
|
|
%cast = bitcast <4 x i32><i32 -1, i32 -1, i32 -1, i32 -1> to <2 x double>
|
|
ret <2 x double> %cast
|
|
}
|