Files
clang-p2996/llvm/test/CodeGen/X86/isel-postprocessing-test-fold-memop.ll
Jean-Michel Gorius cd12e79e6d [x86] Propagate memory operands during ISel DAG postprocessing
Summary:
Propagate memory operands when folding test instructions.

This was split from D80062.

Reviewers: craig.topper, rnk, lebedev.ri

Reviewed By: craig.topper

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80140
2020-05-18 21:35:31 +02:00

15 lines
398 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 8 from {{%.*}})
}