llvm.org GIT mirror llvm / e91f926
Revert "Allow SROA to look at a vector type and see if the offset is out of range to be replaced with a scalar access" This reverts commit 51786e0aaec76b973205066bd44f7f427b21969f. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158408 91177308-0d34-0410-b5e6-96231b3b80d8 Pete Cooper 7 years ago
2 changed file(s) with 7 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
17631763 if (Offset >= AT->getNumElements() * EltSize)
17641764 return false;
17651765 Offset %= EltSize;
1766 } else if (VectorType *VT = dyn_cast(T)) {
1767 EltTy = VT->getElementType();
1768 EltSize = TD->getTypeAllocSize(EltTy);
1769 if (Offset >= VT->getNumElements() * EltSize)
1770 return false;
1771 Offset %= EltSize;
17721766 } else {
17731767 return false;
17741768 }
99
1010 ; CHECK: main
1111 ; CHECK-NOT: alloca
12 ; CHECK: extractelement <2 x float> zeroinitializer, i32 0
12 ; CHECK: %[[A:[a-z0-9]*]] = and i128
13 ; CHECK: %[[B:[a-z0-9]*]] = trunc i128 %[[A]] to i32
1314
1415 define void @main() uwtable ssp {
1516 entry:
2627
2728 ; CHECK: test1
2829 ; CHECK-NOT: alloca
29 ; CHECK: extractelement <2 x float> zeroinitializer, i32 0
30 ; CHECK: %[[A:[a-z0-9]*]] = and i128
31 ; CHECK: %[[B:[a-z0-9]*]] = trunc i128 %[[A]] to i32
3032
3133 define void @test1() uwtable ssp {
3234 entry:
4042
4143 ; CHECK: test2
4244 ; CHECK-NOT: alloca
43 ; CHECK: %[[A:[a-z0-9]*]] = extractelement <2 x float> zeroinitializer, i32 0
44 ; CHECK: fadd float %[[A]], 1.000000e+00
45 ; CHECK: and i128
46 ; CHECK: or i128
47 ; CHECK: trunc i128
4548 ; CHECK-NOT: insertelement
4649 ; CHECK-NOT: extractelement
4750