https://llvm.org/bugs/show_bug.cgi?id=28624

            Bug ID: 28624
           Summary: lib/Target/AArch64/AArch64InstrInfo.cpp:3556:
                    suspicious shift ?
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: dcb...@hotmail.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

trunk/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:3556]: (error) Shifting
32-bit value by 32 bits is undefined behaviour

Source code is

    uint64_t UImm = -Imm << (64 - BitSize) >> (64 - BitSize);

Maybe better code

    uint64_t UImm = ((uint64_t) -Imm) << (64 - BitSize) >> (64 - BitSize);

-- 
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

Reply via email to