[ConstExpr] Avoid creation of select constant expressions
authorNikita Popov <npopov@redhat.com>
Mon, 27 Feb 2023 15:56:45 +0000 (16:56 +0100)
committerNikita Popov <npopov@redhat.com>
Mon, 27 Feb 2023 16:10:05 +0000 (17:10 +0100)
commit5d6dfba1a876456e4ef8e692afa4901b4fa90755
tree44dd0017c7e54eb3ef137da0a4a76bb9ba67d5ca
parentb12bcf3fb7fa7f968e8bd77b466057509ab2e04b
[ConstExpr] Avoid creation of select constant expressions

These expressions will now only be created if explicitly requested
in IR/bitcode (and by LowerTypeTests, which has a tricky to remove
use).

This is in preparation for removing these expressions entirely,
but also fixes #60983 in the meantime.
llvm/include/llvm/Analysis/TargetFolder.h
llvm/include/llvm/IR/ConstantFolder.h
llvm/lib/Analysis/ConstantFolding.cpp
llvm/test/Transforms/InstCombine/phi-select-constant.ll