18 lines · plain
1; RUN: opt < %s --passes=instcombine -S | FileCheck %s2;3; Check that string replacements inserted by the instcombiner are properly aligned.4; The specific case checked replaces `printf("foo\n")` with `puts("foo")`5 6target datalayout = "i8:8:16"7 8@msg1 = constant [17 x i8] c"Alignment Check\0A\00", align 29; CHECK: c"Alignment Check\00", align 210 11; Function Attrs: noinline nounwind12define dso_local void @foo() #0 {13 %call = call signext i32 (ptr, ...) @printf(ptr noundef @msg1)14 ret void15}16 17declare signext i32 @printf(ptr noundef, ...) #118