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:
17
cranelift/filetests/filetests/isa/x64/band_not_bmi1.clif
Normal file
17
cranelift/filetests/filetests/isa/x64/band_not_bmi1.clif
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user