summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/fp_load_cast_fold.llx
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/fp_load_cast_fold.llx')
-rw-r--r--llvm/test/CodeGen/X86/fp_load_cast_fold.llx29
1 files changed, 16 insertions, 13 deletions
diff --git a/llvm/test/CodeGen/X86/fp_load_cast_fold.llx b/llvm/test/CodeGen/X86/fp_load_cast_fold.llx
index b1346958ced..54523265e91 100644
--- a/llvm/test/CodeGen/X86/fp_load_cast_fold.llx
+++ b/llvm/test/CodeGen/X86/fp_load_cast_fold.llx
@@ -1,17 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep fild | not grep ESP
-double %short(short* %P) {
- %V = load short* %P
- %V2 = cast short %V to double
- ret double %V2
+; RUN: llvm-as < %s | llc -march=x86 | grep fild | not grep ESP
+
+define double @short(i16* %P) {
+ %V = load i16* %P ; <i16> [#uses=1]
+ %V2 = sitofp i16 %V to double ; <double> [#uses=1]
+ ret double %V2
}
-double %int(int* %P) {
- %V = load int* %P
- %V2 = cast int %V to double
- ret double %V2
+
+define double @int(i32* %P) {
+ %V = load i32* %P ; <i32> [#uses=1]
+ %V2 = sitofp i32 %V to double ; <double> [#uses=1]
+ ret double %V2
}
-double %long(long* %P) {
- %V = load long* %P
- %V2 = cast long %V to double
- ret double %V2
+
+define double @long(i64* %P) {
+ %V = load i64* %P ; <i64> [#uses=1]
+ %V2 = sitofp i64 %V to double ; <double> [#uses=1]
+ ret double %V2
}
OpenPOWER on IntegriCloud