aboutsummaryrefslogtreecommitdiffstats
path: root/test/Assembler/insertextractvalue.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-31 00:58:22 +0000
committerDan Gohman <gohman@apple.com>2008-05-31 00:58:22 +0000
commit81a0c0b44e582baca8b68754a7fcabfc3aef2e7a (patch)
tree0b0d24cd0d230447b1d8419bb0360c74955fdda1 /test/Assembler/insertextractvalue.ll
parent652f7ea955bb433d6b7a4d33685dca9485fd7b8b (diff)
downloadexternal_llvm-81a0c0b44e582baca8b68754a7fcabfc3aef2e7a.zip
external_llvm-81a0c0b44e582baca8b68754a7fcabfc3aef2e7a.tar.gz
external_llvm-81a0c0b44e582baca8b68754a7fcabfc3aef2e7a.tar.bz2
IR, bitcode reader, bitcode writer, and asmparser changes to
insertvalue and extractvalue to use constant indices instead of Value* indices. And begin updating LangRef.html. There's definately more to come here, but I'm checking this basic support in now to make it available to people who are interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51806 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler/insertextractvalue.ll')
-rw-r--r--test/Assembler/insertextractvalue.ll18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/Assembler/insertextractvalue.ll b/test/Assembler/insertextractvalue.ll
index ae03f45..bdd0932 100644
--- a/test/Assembler/insertextractvalue.ll
+++ b/test/Assembler/insertextractvalue.ll
@@ -1,13 +1,13 @@
; RUN: llvm-as < %s
-;define float @foo({{i32},{float, double}}* %p) {
- ;%t = load {{i32},{float, double}}* %p
- ;%s = extractvalue {{i32},{float, double}} %t, i32 1, i32 0
- ;%r = insertvalue {{i32},{float, double}} %t, double 2.0, i32 1, i32 1
- ;store {{i32},{float, double}} %r, {{i32},{float, double}}* %p
- ;ret float %s
-;}
+define float @foo({{i32},{float, double}}* %p) {
+ %t = load {{i32},{float, double}}* %p
+ %s = extractvalue {{i32},{float, double}} %t, 1, 0
+ %r = insertvalue {{i32},{float, double}} %t, double 2.0, 1, 1
+ store {{i32},{float, double}} %r, {{i32},{float, double}}* %p
+ ret float %s
+}
define float @bar({{i32},{float, double}}* %p) {
- store {{i32},{float, double}} insertvalue ({{i32},{float, double}}{{i32}{i32 4},{float, double}{float 4.0, double 5.0}}, double 20.0, i32 1, i32 1), {{i32},{float, double}}* %p
- ret float extractvalue ({{i32},{float, double}}{{i32}{i32 3},{float, double}{float 7.0, double 9.0}}, i32 1, i32 0)
+ store {{i32},{float, double}} insertvalue ({{i32},{float, double}}{{i32}{i32 4},{float, double}{float 4.0, double 5.0}}, double 20.0, 1, 1), {{i32},{float, double}}* %p
+ ret float extractvalue ({{i32},{float, double}}{{i32}{i32 3},{float, double}{float 7.0, double 9.0}}, 1, 0)
}