https://bugs.llvm.org/show_bug.cgi?id=48651
Bug ID: 48651
Summary: [Hexagon] Suspicious 'dead store' in SplatB pattern
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: Hexagon
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
def SplatB: SDNodeXForm<imm, [{
uint32_t V = N->getZExtValue();
assert(isUInt<8>(V) || V >> 8 == 0xFFFFFF);
uint32_t S = V << 24 | V << 16 | V << 8 | V;
V &= 0xFF;
return CurDAG->getTargetConstant(S, SDLoc(N), MVT::i32);
}]>;
clang static analyzer reports this as a dead store - but isn't the problem that
we need to mask V's bottom 8 bits before S 'splats' it across the 32-bits:
def SplatB: SDNodeXForm<imm, [{
uint32_t V = N->getZExtValue();
assert(isUInt<8>(V) || V >> 8 == 0xFFFFFF);
V &= 0xFF;
uint32_t S = V << 24 | V << 16 | V << 8 | V;
return CurDAG->getTargetConstant(S, SDLoc(N), MVT::i32);
}]>;
--
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