https://bugs.llvm.org/show_bug.cgi?id=44212
Bug ID: 44212
Summary: Type pruning not working when casting/indirection is
used
Product: clang
Version: 8.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: stan.kva...@mediatek.com
CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
neeil...@live.com, richard-l...@metafoo.co.uk
Created attachment 22887
--> https://bugs.llvm.org/attachment.cgi?id=22887&action=edit
testcase
Clang emits incorrect TBAA information when accessing a union member with any
kind of casting. In the example attached, r.w[i] gets the right TBAA type info
of omnipotent char. Any other access like ((int*)r.w)[i] or *(r.w + i) gets
TBAA int type. This leads to incorrect optimization as shown in the attachment.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs