Skip to content

Commit ecb4ac2

Browse files
jgu222sys_zuul
authored andcommitted
Internal fixing and refactoring
Change-Id: I4b1cc312e0f0b0564fd520d8a9fc90ee742938d6
1 parent 89e40d0 commit ecb4ac2

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,7 @@ class EmitPass : public llvm::FunctionPass
672672
bool isHalfGRFReturn(CVariable* dst, SIMDMode simdMode);
673673

674674
void emitFeedbackEnable();
675+
675676
};
676677

677678
} // namespace IGC

IGC/Compiler/CISACodeGen/VectorProcess.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ bool VectorProcess::reLayoutLoadStore(Instruction* Inst)
201201

202202
Value* Ptr = nullptr;
203203
Type* Ty = nullptr;
204-
205204
if (nullptr != LI)
206205
{
207206
Ptr = LI->getPointerOperand();
@@ -254,8 +253,8 @@ bool VectorProcess::reLayoutLoadStore(Instruction* Inst)
254253

255254
//
256255
// Assumption:
257-
// 1. if vector size < 4 bytes, it must be 1 or 2 bytes (never 3);
258-
// 2. if vector size >= 4 bytes, it must be multiple of DW
256+
// 1. if the size of vector < 4 bytes, it must be 1 or 2 bytes (never 3);
257+
// 2. if the size of vector >= 4 bytes, it must be multiple of DW
259258
// Those 2 assumption are guaranteed by VectorPreProcess.
260259
//
261260
// So far, we are using A32 untyped and byte scattered messages,
@@ -301,15 +300,14 @@ bool VectorProcess::reLayoutLoadStore(Instruction* Inst)
301300
{
302301
align = LI->getAlignment();
303302
}
303+
else if (SI)
304+
{
305+
align = SI->getAlignment();
306+
}
304307
else
305-
if (SI)
306-
{
307-
align = SI->getAlignment();
308-
}
309-
else
310-
{
311-
align = 1;
312-
}
308+
{
309+
align = 1;
310+
}
313311

314312
bool useQW = useA64 && ((TBytes % 8) == 0) &&
315313
((has_8Byte_A64_BS && align < 4) || (eTyBytes == 8U && align >= 8U));

0 commit comments

Comments
 (0)