Files
clang-p2996/llvm/test/CodeGen/X86/isel-postprocessing-test-fold-memop.ll
Matt Arsenault fae05692a3 CodeGen: Print/parse LLTs in MachineMemOperands
This will currently accept the old number of bytes syntax, and convert
it to a scalar. This should be removed in the near future (I think I
converted all of the tests already, but likely missed a few).

Not sure what the exact syntax and policy should be. We can continue
printing the number of bytes for non-generic instructions to avoid
test churn and only allow non-scalar types for generic instructions.

This will currently print the LLT in parentheses, but accept parsing
the existing integers and implicitly converting to scalar. The
parentheses are a bit ugly, but the parser logic seems unable to deal
without either parentheses or some keyword to indicate the start of a
type.
2021-06-30 16:54:13 -04:00

15 lines
402 B
LLVM

; RUN: llc -O2 -mtriple=x86_64-- -stop-after=finalize-isel < %s | FileCheck %s
define i1 @fold_test(i64* %x, i64 %l) {
entry:
%0 = load i64, i64* %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 {{%.*}})
}