Correct syntax of getelementptr in regression test. NFC

Bonus: unused variable removed.
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@236116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pawel Bylica committed 2015-04-29 16:05:29 +00:00
1 parent 2ce57c3359
commit bff4c86723
2 files changed
+10 -13

No files matched your search

-3
View File
@@ -288,14 +288,11 @@ bool SimplifyIndvar::strengthenOverflowingOperation(BinaryOperator *BO,
IntegerType *IT = cast<IntegerType>(IVOperand->getType()); IntegerType *IT = cast<IntegerType>(IVOperand->getType());
Value *OtherOperand = nullptr; Value *OtherOperand = nullptr;
int OtherOperandIdx = -1;
if (BO->getOperand(0) == IVOperand) { if (BO->getOperand(0) == IVOperand) {
OtherOperand = BO->getOperand(1); OtherOperand = BO->getOperand(1);
OtherOperandIdx = 1;
} else { } else {
assert(BO->getOperand(1) == IVOperand && "only other use!"); assert(BO->getOperand(1) == IVOperand && "only other use!");
OtherOperand = BO->getOperand(0); OtherOperand = BO->getOperand(0);
OtherOperandIdx = 0;
} }
bool Changed = false; bool Changed = false;
+10 -10
View File
@@ -9,35 +9,35 @@
define i8* @test_trunc65(i8* %ptr) nounwind { define i8* @test_trunc65(i8* %ptr) nounwind {
; CHECK-LABEL: test_trunc65 ; CHECK-LABEL: test_trunc65
; CHECK: 3 ; CHECK: 3
%d = getelementptr i8, i8* %ptr, i65 18446744073709551619 ; 2^64 + 3 %d = getelementptr i8* %ptr, i65 18446744073709551619 ; 2^64 + 3
ret i8* %d ret i8* %d
} }
define i8* @test_trunc128(i8* %ptr) nounwind { define i8* @test_trunc128(i8* %ptr) nounwind {
; CHECK-LABEL: test_trunc128 ; CHECK-LABEL: test_trunc128
; CHECK: 5 ; CHECK: 5
%d = getelementptr i8, i8* %ptr, i128 18446744073709551621 ; 2^64 + 5 %d = getelementptr i8* %ptr, i128 18446744073709551621 ; 2^64 + 5
ret i8* %d ret i8* %d
} }
define i8* @test_trunc160(i8* %ptr) nounwind { define i8* @test_trunc160(i8* %ptr) nounwind {
; CHECK-LABEL: test_trunc160 ; CHECK-LABEL: test_trunc160
; CHECK: 8 ; CHECK: 8
%d = getelementptr i8, i8* %ptr, i160 18446744073709551624 ; 2^64 + 8 %d = getelementptr i8* %ptr, i160 18446744073709551624 ; 2^64 + 8
ret i8* %d ret i8* %d
} }
define i8* @test_trunc256(i8* %ptr) nounwind { define i8* @test_trunc256(i8* %ptr) nounwind {
; CHECK-LABEL: test_trunc256 ; CHECK-LABEL: test_trunc256
; CHECK: 13 ; CHECK: 13
%d = getelementptr i8, i8* %ptr, i256 18446744073709551629 ; 2^64 + 13 %d = getelementptr i8* %ptr, i256 18446744073709551629 ; 2^64 + 13
ret i8* %d ret i8* %d
} }
define i8* @test_trunc2048(i8* %ptr) nounwind { define i8* @test_trunc2048(i8* %ptr) nounwind {
; CHECK-LABEL: test_trunc2048 ; CHECK-LABEL: test_trunc2048
; CHECK: 21 ; CHECK: 21
%d = getelementptr i8, i8* %ptr, i2048 18446744073709551637 ; 2^64 + 21 %d = getelementptr i8* %ptr, i2048 18446744073709551637 ; 2^64 + 21
ret i8* %d ret i8* %d
} }
@@ -47,34 +47,34 @@ define i8* @test_trunc2048(i8* %ptr) nounwind {
define i8* @test_sext3(i8* %ptr) nounwind { define i8* @test_sext3(i8* %ptr) nounwind {
; CHECK-LABEL: test_sext3 ; CHECK-LABEL: test_sext3
; CHECK: -3 ; CHECK: -3
%d = getelementptr i8, i8* %ptr, i3 -3 %d = getelementptr i8* %ptr, i3 -3
ret i8* %d ret i8* %d
} }
define i8* @test_sext5(i8* %ptr) nounwind { define i8* @test_sext5(i8* %ptr) nounwind {
; CHECK-LABEL: test_sext5 ; CHECK-LABEL: test_sext5
; CHECK: -5 ; CHECK: -5
%d = getelementptr i8, i8* %ptr, i5 -5 %d = getelementptr i8* %ptr, i5 -5
ret i8* %d ret i8* %d
} }
define i8* @test_sext8(i8* %ptr) nounwind { define i8* @test_sext8(i8* %ptr) nounwind {
; CHECK-LABEL: test_sext8 ; CHECK-LABEL: test_sext8
; CHECK: -8 ; CHECK: -8
%d = getelementptr i8, i8* %ptr, i8 -8 %d = getelementptr i8* %ptr, i8 -8
ret i8* %d ret i8* %d
} }
define i8* @test_sext13(i8* %ptr) nounwind { define i8* @test_sext13(i8* %ptr) nounwind {
; CHECK-LABEL: test_sext13 ; CHECK-LABEL: test_sext13
; CHECK: -13 ; CHECK: -13
%d = getelementptr i8, i8* %ptr, i8 -13 %d = getelementptr i8* %ptr, i8 -13
ret i8* %d ret i8* %d
} }
define i8* @test_sext16(i8* %ptr) nounwind { define i8* @test_sext16(i8* %ptr) nounwind {
; CHECK-LABEL: test_sext16 ; CHECK-LABEL: test_sext16
; CHECK: -21 ; CHECK: -21
%d = getelementptr i8, i8* %ptr, i8 -21 %d = getelementptr i8* %ptr, i8 -21
ret i8* %d ret i8* %d
} }