diff --git a/lib/SPIRV/SPIRVReader.cpp b/lib/SPIRV/SPIRVReader.cpp index 8f6e6fa66..d7c42f6fb 100644 --- a/lib/SPIRV/SPIRVReader.cpp +++ b/lib/SPIRV/SPIRVReader.cpp @@ -3012,7 +3012,7 @@ void SPIRVToLLVM::transFunctionAttrs(SPIRVFunction *BF, Function *F) { if (BA->hasDecorate(DecorationMaxByteOffset, 0, &MaxOffset)) Builder.addDereferenceableAttr(MaxOffset); SPIRVWord AlignmentBytes = 0; - if (BA->hasDecorate(DecorationAlignment, 0, &AlignmentBytes)) + if (BA->hasAlignment(&AlignmentBytes)) Builder.addAlignmentAttr(AlignmentBytes); I->addAttrs(Builder); }