llvm-project/llvm/test/CodeGen/X86/isel-postprocessing-test-fold-memop.ll
Nikita Popov 2f448bf509 [X86] Migrate tests to use opaque pointers (NFC)
Test updates were performed using:
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34

These are only the test updates where the test passed without
further modification (which is almost all of them, as the backend
is largely pointer-type agnostic).
2022-06-22 14:38:25 +02:00

15 lines
400 B
LLVM

; RUN: llc -O2 -mtriple=x86_64-- -stop-after=finalize-isel < %s | FileCheck %s
define i1 @fold_test(ptr %x, i64 %l) {
entry:
%0 = load i64, ptr %x, align 8
%and = and i64 %0, %l
%tobool = icmp ne i64 %and, 0
ret i1 %tobool
; Folding the load+and+icmp instructions into a TEST64mr instruction
; should preserve memory operands.
; CHECK: TEST64mr {{.*}} :: (load (s64) from {{%.*}})
}