Use andn for band_not when bmi1 is present (#5701)

We can use the andn instruction for the lowering of band_not on x64 when bmi1 is available.
This commit is contained in:
Trevor Elliott
2023-02-03 16:23:18 -08:00
committed by GitHub
parent 0ba1448fa4
commit 6d8f2be9e1
7 changed files with 141 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
test compile precise-output
target x86_64 has_bmi1
function %f1(i8, i8) -> i8 {
block0(v0: i8, v1: i8):
v2 = band_not v0, v1
return v2
}
; pushq %rbp
; movq %rsp, %rbp
; block0:
; andn %eax, %esi, %edi
; movq %rbp, %rsp
; popq %rbp
; ret