brintos

brintos / llvm-project-archived public Read only

0
0
Text · 480 B · 301551c Raw
20 lines · plain
1; RUN: opt -passes=instcombine -S < %s | FileCheck %s2 3target datalayout = "e-p:32:32-n32-S64"4 5; CHECK-LABEL: @foo_ptr6; CHECK: and7define i32 @foo_ptr() {8entry:9  ; Even though the address of @foo is aligned, we cannot assume that the10  ; pointer has the same alignment. This is not true for e.g. ARM targets11  ; which store ARM/Thumb state in the LSB12  %and = and i32 ptrtoint (ptr @foo to i32), -413  ret i32 %and14}15 16define internal void @foo() align 16 {17entry:18  ret void19}20