Revert r359392 and r358887
authorCraig Topper <craig.topper@intel.com>
Mon, 6 May 2019 19:29:24 +0000 (19:29 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 6 May 2019 19:29:24 +0000 (19:29 +0000)
commit55a71b575c374f99d427aba3ae798194587e95e2
tree9dac149fb90afcbf3c8dcd7bffa7642f2e6e01e6
parent1e18bfe89213177773ceaf9d9dedd743b20b61b1
Revert r359392 and r358887

Reverts "[X86] Remove (V)MOV64toSDrr/m and (V)MOVDI2SSrr/m. Use 128-bit result MOVD/MOVQ and COPY_TO_REGCLASS instead"
Reverts "[TargetLowering][AMDGPU][X86] Improve SimplifyDemandedBits bitcast handling"

Eric Christopher and Jorge Gorbe Moya reported some issues with these patches to me off list.

Removing the CodeGenOnly instructions has changed how fneg is handled during fast-isel with sse/sse2. We're now emitting fsub -0.0, x instead
moving to the integer domain(in a GPR), xoring the sign bit, and then moving back to xmm. This is because the fast isel table no longer
contains an entry for (f32/f64 bitcast (i32/i64)) so the target independent fneg code fails. The use of fsub changes the behavior of nan with
respect to -O2 codegen which will always use a pxor. NOTE: We still have a difference with double with -m32 since the move to GPR doesn't work
there. I'll file a separate PR for that and add test cases.

Since removing the CodeGenOnly instructions was fixing PR41619, I'm reverting r358887 which exposed that PR. Though I wouldn't be surprised
if that bug can still be hit independent of that.

This should hopefully get Google back to green. I'll work with Simon and other X86 folks to figure out how to move forward again.

llvm-svn: 360066
16 files changed:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/lib/Target/X86/X86InstrFoldTables.cpp
llvm/lib/Target/X86/X86InstrSSE.td
llvm/test/CodeGen/AMDGPU/store-weird-sizes.ll
llvm/test/CodeGen/X86/bitcast-setcc-256.ll
llvm/test/CodeGen/X86/bitcast-setcc-512.ll
llvm/test/CodeGen/X86/bitcast-vector-bool.ll
llvm/test/CodeGen/X86/dagcombine-cse.ll
llvm/test/CodeGen/X86/evex-to-vex-compress.mir
llvm/test/CodeGen/X86/fast-isel-fneg.ll
llvm/test/CodeGen/X86/masked_store.ll
llvm/test/CodeGen/X86/movmsk-cmp.ll
llvm/test/CodeGen/X86/peephole.mir [new file with mode: 0644]
llvm/test/CodeGen/X86/pr41619.ll [deleted file]