[PATCH] D144445: [ConstantFold][InstSimplify] folding load for constant global all-element-equal arrays and structs
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 20 23:27:39 PST 2023
StephenFan added a comment.
Is it correct if we load with the same type as the const array but the load's pointer operand is with the i8* type?
define i32 @load_gep_const_alleq_array(i64 %idx) {
%gep = getelementptr inbounds i8, ptr @constalleqarray, i64 %idx
%load = load i32, ptr %gep
ret i32 %load
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144445/new/
https://reviews.llvm.org/D144445
More information about the llvm-commits
mailing list