[SROA] Remove UB-implying metadata when promoting speculative instruction.
authorDianQK <dianqk@dianqk.net>
Sun, 16 Apr 2023 14:35:27 +0000 (22:35 +0800)
committerDianQK <dianqk@dianqk.net>
Sun, 16 Apr 2023 14:35:52 +0000 (22:35 +0800)
commit2832d7941f4207f1fcf813b27cf08cecc3086959
tree48f646bd9811adb5b1afc1e63f4b94b200a04623
parent2db031528e3e0e2d6ab6087af9bae9e0ccbdfc06
[SROA] Remove UB-implying metadata when promoting speculative instruction.

After D138238 introduced the then/else blocks, we should remove UB-implying metadata for the promoted speculative instruction.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D148456
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/select-load.ll