
The data-layout independent constant folding currently has some rather gnarly code for canonicalizing GEP indices to reduce "notional overindexing", and then infers inbounds based on that canonicalization. Now that we canonicalize to i8 GEPs, this canonicalization is essentially useless, as we'll discard it as soon as the GEP hits the data-layout aware constant folder anyway. As such, I'd like to remove this code entirely. This shouldn't have any impact on optimization capabilities.
10 lines
355 B
LLVM
10 lines
355 B
LLVM
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
|
|
@G = global [4 x i32] zeroinitializer
|
|
|
|
; CHECK-LABEL: @foo
|
|
; CHECK: ret <4 x ptr> getelementptr ([4 x i32], ptr @G, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 1, i32 2, i32 3>)
|
|
define <4 x ptr> @foo() {
|
|
ret <4 x ptr> getelementptr ([4 x i32], ptr @G, i32 0, <4 x i32> <i32 0, i32 1, i32 2, i32 3>)
|
|
}
|