[PATCH] D155461: [InstCombine] Keep !unpredictable when combining select+add
Paweł Bylica via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 17 07:11:58 PDT 2023
chfast added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:540
Value *NewSel = Builder.CreateSelect(SI.getCondition(), Swapped ? C : OOp,
- Swapped ? OOp : C);
+ Swapped ? OOp : C, "", &SI);
if (isa<FPMathOperator>(&SI))
----------------
I believe there are more case in the file where metadata copy is missed. I will try to identify them and create more tests cases. Can be in this review on later, depending on reviewers' suggestion.
================
Comment at: llvm/test/Transforms/InstCombine/unpredictable-select.ll:1
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=instcombine -S | FileCheck %s
----------------
I created this test file. Is this good location?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155461/new/
https://reviews.llvm.org/D155461
More information about the llvm-commits
mailing list