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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

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
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to