[PATCH] D140371: [Attributor] potential constant values for PHI and Load
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 22:23:46 PST 2022
sameerds added inline comments.
================
Comment at: llvm/test/Transforms/Attributor/value-simplify.ll:191
; CHECK-NEXT: [[PHI_SAME_UNDEF:%.*]] = phi i32 [ 1, [[IF_TRUE]] ], [ undef, [[IF_FALSE]] ]
+; CHECK-NEXT: [[SELECT_NOT_SAME_UNDEF:%.*]] = select i1 [[C]], i32 [[PHI_NOT_SAME]], i32 undef
; CHECK-NEXT: tail call void @use(i32 noundef 1)
----------------
This optimization was a fluke. Now that the constant vaules of `%phi-not-same` are exposed, `%select-not-same-undef` is no longer simplified to a single value. This needs further simplification using constant values in `getAssumedSimplified()`, similar to how AAPotentialConstantValues looks at the constant values of each operand.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140371/new/
https://reviews.llvm.org/D140371
More information about the llvm-commits
mailing list