llvm.org GIT mirror llvm / c1e5d49
Fixed a widening bug where we were not using the correct size for the load git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98920 91177308-0d34-0410-b5e6-96231b3b80d8 Mon P Wang 10 years ago
2 changed file(s) with 26 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
21662166 } else
21672167 return LdOp;
21682168 } else {
2169 unsigned NumElts = WidenWidth / LdWidth;
2169 unsigned NumElts = WidenWidth / NewVTWidth;
21702170 EVT NewVecVT = EVT::getVectorVT(*DAG.getContext(), NewVT, NumElts);
21712171 SDValue VecOp = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, NewVecVT, LdOp);
21722172 return DAG.getNode(ISD::BIT_CONVERT, dl, WidenVT, VecOp);
151151 %x = add %i8vec31 %a, %b
152152 store %i8vec31 %x, %i8vec31* %ret, align 16
153153 ret void
154 }
154 }
155
156
157 %i8vec3pack = type { <3 x i8>, i8 }
158 define %i8vec3pack @rot() nounwind {
159 ; CHECK: shrb
160 entry:
161 %X = alloca %i8vec3pack, align 4
162 %rot = alloca %i8vec3pack, align 4
163 %result = alloca %i8vec3pack, align 4
164 %storetmp = bitcast %i8vec3pack* %X to <3 x i8>*
165 store <3 x i8> , <3 x i8>* %storetmp
166 %storetmp1 = bitcast %i8vec3pack* %rot to <3 x i8>*
167 store <3 x i8> , <3 x i8>* %storetmp1
168 %tmp = load %i8vec3pack* %X
169 %extractVec = extractvalue %i8vec3pack %tmp, 0
170 %tmp2 = load %i8vec3pack* %rot
171 %extractVec3 = extractvalue %i8vec3pack %tmp2, 0
172 %shr = lshr <3 x i8> %extractVec, %extractVec3
173 %storetmp4 = bitcast %i8vec3pack* %result to <3 x i8>*
174 store <3 x i8> %shr, <3 x i8>* %storetmp4
175 %tmp5 = load %i8vec3pack* %result
176 ret %i8vec3pack %tmp5
177 }
178