mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 12:02:58 +02:00
[DAGCombiner] simplifyDivRem - add comment describing divide by undef/zero combine. NFC.
llvm-svn: 339561
This commit is contained in:
parent
2b765f36a3
commit
240a19ccac
@ -3076,6 +3076,11 @@ static SDValue simplifyDivRem(SDNode *N, SelectionDAG &DAG) {
|
||||
EVT VT = N->getValueType(0);
|
||||
SDLoc DL(N);
|
||||
|
||||
// X / undef -> undef
|
||||
// X % undef -> undef
|
||||
// X / 0 -> undef
|
||||
// X % 0 -> undef
|
||||
// NOTE: This includes vectors where any divisor element is zero/undef.
|
||||
if (DAG.isUndef(N->getOpcode(), {N0, N1}))
|
||||
return DAG.getUNDEF(VT);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user