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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user