summaryrefslogtreecommitdiffstats
path: root/llvm/docs/LangRef.html
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-05-16 19:29:30 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-05-16 19:29:30 +0000
commit9c876bf937ceb1e8d0fd69e4d82d9f31650d0d98 (patch)
tree6a26313fc80fb494a68fcc4ceba0ab9c0e9d6e05 /llvm/docs/LangRef.html
parentb5059acc5f9dc0fe7a7e607d59b7fd560cd87a0c (diff)
downloadbcm5719-llvm-9c876bf937ceb1e8d0fd69e4d82d9f31650d0d98.tar.gz
bcm5719-llvm-9c876bf937ceb1e8d0fd69e4d82d9f31650d0d98.zip
Fix errors in this llvm ir example.
llvm-svn: 131416
Diffstat (limited to 'llvm/docs/LangRef.html')
-rw-r--r--llvm/docs/LangRef.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/docs/LangRef.html b/llvm/docs/LangRef.html
index 381fed5c6d3..58da87540d8 100644
--- a/llvm/docs/LangRef.html
+++ b/llvm/docs/LangRef.html
@@ -2446,11 +2446,11 @@ entry:
%narrowaddr = bitcast i32* @g to i16*
%wideaddr = bitcast i32* @g to i64*
- %trap3 = load 16* %narrowaddr ; Returns a trap value.
- %trap4 = load i64* %widaddr ; Returns a trap value.
+ %trap3 = load i16* %narrowaddr ; Returns a trap value.
+ %trap4 = load i64* %wideaddr ; Returns a trap value.
- %cmp = icmp i32 slt %trap, 0 ; Returns a trap value.
- %br i1 %cmp, %true, %end ; Branch to either destination.
+ %cmp = icmp slt i32 %trap, 0 ; Returns a trap value.
+ br i1 %cmp, label %true, label %end ; Branch to either destination.
true:
volatile store i32 0, i32* @g ; This is control-dependent on %cmp, so
@@ -2467,19 +2467,19 @@ end:
; if %cmp is true, or the store in %entry
; otherwise, so this is undefined behavior.
- %br i1 %cmp, %second_true, %second_end
+ br i1 %cmp, label %second_true, label %second_end
; The same branch again, but this time the
; true block doesn't have side effects.
second_true:
; No side effects!
- br label %end
+ ret void
second_end:
volatile store i32 0, i32* @g ; This time, the instruction always depends
; on the store in %end. Also, it is
; control-equivalent to %end, so this is
- ; well- defined (again, ignoring earlier
+ ; well-defined (again, ignoring earlier
; undefined behavior in this example).
</pre>
OpenPOWER on IntegriCloud