https://llvm.org/bugs/show_bug.cgi?id=31896
Bug ID: 31896 Summary: ARM miscompilation of store of global alias Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Backend: ARM Assignee: unassignedb...@nondot.org Reporter: eugeni.stepa...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified $ cat q.ll target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" target triple = "thumbv7--linux" @X = constant {i8, i8 } { i8 0, i8 0 } @XA = alias i8, getelementptr inbounds ({ i8, i8 }, {i8, i8}* @X, i32 0, i32 0) @XB = alias i8, getelementptr inbounds ({ i8, i8 }, {i8, i8}* @X, i32 0, i32 1) ; not using alias - OK define void @zzz(i8** %p) align 2 { entry: store i8* getelementptr inbounds ({ i8, i8 }, {i8, i8}* @X, i32 0, i32 1), i8 **%p, align 4 ret void } ; store by alias. zzzA and zzzB generate identical code. define void @zzzA(i8** %p) align 2 { entry: store i8* @XA, i8 **%p, align 4 ret void } define void @zzzB(i8** %p) align 2 { entry: store i8* @XB, i8 **%p, align 4 ret void } $ bin/llc q.ll -o - zzz: .fnstart @ BB#0: @ %entry movw r1, :lower16:X movt r1, :upper16:X adds r1, #1 str r1, [r0] bx lr zzzA: .fnstart @ BB#0: @ %entry movw r1, :lower16:X movt r1, :upper16:X str r1, [r0] bx lr zzzB: .fnstart @ BB#0: @ %entry movw r1, :lower16:X movt r1, :upper16:X str r1, [r0] bx lr Note how @XA and @XB are different, but assembly for @zzzA and @zzzB is the same. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs