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