https://llvm.org/bugs/show_bug.cgi?id=31724
Bug ID: 31724 Summary: Clang's call lowering often coerces pointers to ints, which blocks alias analysis Product: clang Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: LLVM Codegen Assignee: unassignedclangb...@nondot.org Reporter: r...@google.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Consider this C code: struct Handle { void *p; }; extern void g(struct Handle); void f(struct Handle o) { g(o); } Here are three examples of clang coercing the 'p' field to an int: $ clang -S -x c --target=ppc64-linux t.cpp -o - -emit-llvm | grep define define void @f(i64 %o.coerce) #0 { $ clang -S -x c --target=x86_64-windows t.cpp -o - -emit-llvm | grep define define void @f(i64 %o.coerce) #0 { $ clang -S -x c --target=mips-linux t.cpp -o - -emit-llvm | grep define define void @f(i32 inreg %o.coerce) #0 { According to dannyb, this is bad, because the ptrtoint calls block alias analysis. -- 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