Also use --icf=safe if we are being linked by gold.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223394 91177308-0d34-0410-b5e6-96231b3b80d8
Add some tests for SimplifyCFG's ConstantFoldTerminator(). NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223395 91177308-0d34-0410-b5e6-96231b3b80d8
Add some tests for SimplifyCFG's TurnSwitchRangeIntoICmp(). NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223396 91177308-0d34-0410-b5e6-96231b3b80d8
Debug info: If the RegisterCoalescer::reMaterializeTrivialDef() is
eliminating all uses of a vreg, update any DBG_VALUE describing that vreg
to point to the rematerialized register instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223401 91177308-0d34-0410-b5e6-96231b3b80d8
Fix UBSan report in StringMap implementation.

Use offsetof() instead of a member access within null pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223402 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify implementation and testcase of r223401 based on feedback from dblaikie.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223405 91177308-0d34-0410-b5e6-96231b3b80d8