brintos

brintos / llvm-project-archived public Read only

0
0
Text · 458 B · e5da923 Raw
17 lines · plain
1; Test that the strncpy simplification doesn't crash if datalayout specifies2; 64 bit pointers while length is a 32 bit argument3;4; RUN: opt < %s -passes=instcombine -S | FileCheck %s5 6target datalayout = "e-p:64:64:64"7 8declare i32 @strncmp(ptr, ptr, i32)9 10define i32 @test6(ptr %str1, ptr %str2) {11; CHECK-LABEL: @test6(12; CHECK: call i32 @strncmp(ptr %str1, ptr %str2, i32 1)13 14  %temp1 = call i32 @strncmp(ptr %str1, ptr %str2, i32 1)15  ret i32 %temp116}17