Add bitwise ops that invert the second operand.

ARM has all of these as scalar integer instructions. Intel has band_not
in SSE and as a scalar in BMI1.

Add the trivial legalization patterns that use a bnot instruction.
This commit is contained in:
Jakob Stoklund Olesen
2017-07-20 11:14:11 -07:00
parent 014d9a14fe
commit 6ba604125d
4 changed files with 48 additions and 5 deletions

View File

@@ -28,3 +28,11 @@ ebb0(v0: i32):
; check: $(cst=$V) = iconst.i32 0x3b9a_ca00
; check: $v1 = iadd $v0, $cst
; check: return $v1
function %bitclear(i32, i32) -> i32 {
ebb0(v0: i32, v1: i32):
v2 = band_not v0, v1
; check: bnot
; check: band
return v2
}