Add a bconst instruction. (#116)

* Add a bconst instruction.
This commit is contained in:
Dan Gohman
2017-07-13 10:12:25 -07:00
committed by Jakob Stoklund Olesen
parent d8e2cb2b42
commit 3bcfb103b9
9 changed files with 64 additions and 2 deletions

View File

@@ -25,6 +25,23 @@ ebb0:
; nextln: $v2 = ishl $v0, $v1
; nextln: }
; Create and use values.
; Polymorphic instructions with type suffix.
function %bvalues() {
ebb0:
v0 = bconst.b32 true
v1 = bconst.b8 false
v2 = bextend.b32 v1
v3 = bxor v0, v2
}
; sameln: function %bvalues() {
; nextln: ebb0:
; nextln: $v0 = bconst.b32 true
; nextln: $v1 = bconst.b8 false
; nextln: $v2 = bextend.b32 v1
; nextln: $v3 = bxor v0, v2
; nextln: }
; Polymorphic istruction controlled by second operand.
function %select() {
ebb0(v90: i32, v91: i32, v92: b1):