Florian Hahn 6cb54cfe0b [DSE] Move legacy tests to DeadStoreElimination/MemDepAnalysis.
This patch moves the tests for the old MemDepAnalysis based DSE
implementation to the MemDepAnalysis subdirectory and updates them to
pass -enable-dse-memoryssa=false.

This is in preparation for the switch to MemorySSA-backed DSE.
2020-09-04 14:38:03 +01:00

15 lines
437 B
LLVM

; RUN: opt -S -basic-aa -dse -enable-dse-memoryssa=false < %s | FileCheck %s
target triple = "x86_64-unknown-linux-gnu"
declare i8* @strncpy(i8* %dest, i8* %src, i32 %n) nounwind
define void @test2(i8* %src) {
; CHECK-LABEL: @test2(
%B = alloca [16 x i8]
%dest = getelementptr inbounds [16 x i8], [16 x i8]* %B, i64 0, i64 0
; CHECK: @strncpy
%call = call i8* @strncpy(i8* %dest, i8* %src, i32 12)
; CHECK: ret void
ret void
}