5 Commits

Author SHA1 Message Date
Nikita Popov
8a09875dd1 [InstSimplify] Do not remove insertvalue of undef into poison
We cannot remove an insertvalue of undef if it inserts into a
potentially poison value. The new implementation matches that of
insertelement.

See https://alive2.llvm.org/ce/z/pCcFsW for the previously
incorrect transform.
2022-12-08 11:35:59 +01:00
Nikita Popov
8992fce0e0 [InstSimplify] Fix check lines (NFC)
Accidentally used the wrong binary in the previous commit.
2022-12-08 11:22:49 +01:00
Nikita Popov
e161454d2e [InstSimplify] Add test for insertvalue of undef (NFC) 2022-12-08 11:16:46 +01:00
Bjorn Pettersson
b280ee1dd7 [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC
Another step moving away from the deprecated syntax of specifying
pass pipeline in opt.

Differential Revision: https://reviews.llvm.org/D119080
2022-02-07 14:26:58 +01:00
Juneyoung Lee
864dda5fd5 [InstSimplify] Add tests that fold instructions with poison operands (NFC) 2020-12-02 01:01:59 +09:00