[DAGCombiner] Set the right SDLoc on a newly-created zextload (1/N)
authorVedant Kumar <vsk@apple.com>
Tue, 1 May 2018 19:26:15 +0000 (19:26 +0000)
committerVedant Kumar <vsk@apple.com>
Tue, 1 May 2018 19:26:15 +0000 (19:26 +0000)
commitee4bfcaa5ae52c7d36d04da78922e37d288e7c4e
tree630f6d3540441a81b8eb5b3f879918c7fe3ad8bd
parent32ac816fff2fb4137fc9633e459826289ce20481
[DAGCombiner] Set the right SDLoc on a newly-created zextload (1/N)

Setting the right SDLoc on a newly-created zextload fixes a line table
bug which resulted in non-linear stepping behavior.

Several backend tests contained CHECK lines which relied on the IROrder
inherited from the wrong SDLoc. This patch breaks that dependence where
feasbile and regenerates test cases where not.

In some cases, changing a node's IROrder may alter register allocation
and spill behavior. This can affect performance. I have chosen not to
prevent this by applying a "known good" IROrder to SDLocs, as this may
hide a more general bug in the scheduler, or cause regressions on other
test inputs.

rdar://33755881, Part of: llvm.org/PR37262

Differential Revision: https://reviews.llvm.org/D45995

llvm-svn: 331300
17 files changed:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/AArch64/arm64-aapcs.ll
llvm/test/CodeGen/AArch64/arm64-ldp-cluster.ll
llvm/test/CodeGen/ARM/vector-load.ll
llvm/test/CodeGen/SPARC/32abi.ll
llvm/test/CodeGen/SPARC/64abi.ll
llvm/test/CodeGen/X86/avg.ll
llvm/test/CodeGen/X86/dagcombine-cse.ll
llvm/test/CodeGen/X86/fold-zext-trunc.ll
llvm/test/CodeGen/X86/known-bits-vector.ll
llvm/test/CodeGen/X86/legalize-shift-64.ll
llvm/test/CodeGen/X86/load-combine.ll
llvm/test/CodeGen/X86/mulx32.ll
llvm/test/CodeGen/X86/promote-vec3.ll
llvm/test/CodeGen/X86/widen_conv-3.ll
llvm/test/CodeGen/X86/widen_conv-4.ll
llvm/test/CodeGen/X86/win-smallparams.ll