[PATCH] D79217: Process gep (select ptr1, ptr2) in SROA
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 12:58:34 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:3471
+ << "\n original: " << *Sel
+ << "\n " << GEPI);
+ IRBuilderTy Builder(&GEPI);
----------------
Needs a newline after?
================
Comment at: llvm/test/Transforms/SROA/select-gep.ll:15
+ %b = alloca %pair, align 4
+ %select = select i1 %cond, %pair* %a, %pair* %b
+ %gep = getelementptr inbounds %pair, %pair* %select, i32 0, i32 1
----------------
Store something for non-undef test output?
================
Comment at: llvm/test/Transforms/SROA/select-gep.ll:17
+ %gep = getelementptr inbounds %pair, %pair* %select, i32 0, i32 1
+ %load = load i32, i32* %gep, align 4
+ ret i32 %load
----------------
This increases the instruction count if the load won't be eliminated. Can you add a test with a volatile load or something else to prevent it?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79217/new/
https://reviews.llvm.org/D79217
More information about the llvm-commits
mailing list