[llvm] r289822 - Fix for regression after Global Load Scalarization patch
Alexander Timofeev via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 15 07:17:20 PST 2016
Author: alex-t
Date: Thu Dec 15 09:17:19 2016
New Revision: 289822
URL: http://llvm.org/viewvc/llvm-project?rev=289822&view=rev
Log:
Fix for regression after Global Load Scalarization patch
Added:
llvm/trunk/test/CodeGen/AMDGPU/mesa_regression.ll
Modified:
llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp?rev=289822&r1=289821&r2=289822&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIISelLowering.cpp Thu Dec 15 09:17:19 2016
@@ -2785,7 +2785,8 @@ SDValue SITargetLowering::LowerLOAD(SDVa
//
LLVM_FALLTHROUGH;
case AMDGPUAS::GLOBAL_ADDRESS: {
- if (isMemOpUniform(Load) && isMemOpHasNoClobberedMemOperand(Load))
+ if (Subtarget->getScalarizeGlobalBehavior() && isMemOpUniform(Load) &&
+ isMemOpHasNoClobberedMemOperand(Load))
return SDValue();
// Non-uniform loads will be selected to MUBUF instructions, so they
// have the same legalization requirements as global and private
Added: llvm/trunk/test/CodeGen/AMDGPU/mesa_regression.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/mesa_regression.ll?rev=289822&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/mesa_regression.ll (added)
+++ llvm/trunk/test/CodeGen/AMDGPU/mesa_regression.ll Thu Dec 15 09:17:19 2016
@@ -0,0 +1,11 @@
+; RUN: llc -O2 -mtriple amdgcn--amdhsa -mcpu=fiji -amdgpu-scalarize-global-loads=false -verify-machineinstrs < %s | FileCheck %s
+
+; CHECK-LABEL: %entry
+; CHECK: flat_load_dwordx4
+
+define amdgpu_kernel void @store_global(<16 x double> addrspace(1)* nocapture %out, <16 x double> addrspace(1)* nocapture readonly %in) {
+entry:
+ %tmp = load <16 x double>, <16 x double> addrspace(1)* %in
+ store <16 x double> %tmp, <16 x double> addrspace(1)* %out
+ ret void
+}
More information about the llvm-commits
mailing list