This is an archive of the discontinued LLVM Phabricator instance.

[SimplifyCFG] Add test for sinking inline asm in if/else
ClosedPublic

Authored by olista01 on Sep 5 2016, 5:41 AM.

Details

Summary

This test code previously caused a failure in the module verifier,
because SimplifyCFG created this invalid instruction, which tries to
take the address of inline asm:

%.sink = select i1 %1, i64 ()* asm "mov $0, #1", "=r", i64 ()* asm %"mov $0, #2", "=r"

This has been fixed recently, presumably by James Molloy's patches that
re-wrote and changed parts of SimplifyCFG, so this patch just adds a
regression test for it.

Diff Detail

Event Timeline

olista01 updated this revision to Diff 70321.Sep 5 2016, 5:41 AM
olista01 retitled this revision from to [SimplifyCFG] Add test for sinking inline asm in if/else.
olista01 updated this object.
olista01 added reviewers: jmolloy, hans, sanjoy, majnemer.
olista01 set the repository for this revision to rL LLVM.
olista01 added a subscriber: llvm-commits.
jmolloy accepted this revision.Sep 5 2016, 6:35 AM
jmolloy edited edge metadata.

Awesome, an unintended bug fix. Usually I only get told about regressions :)

LGTM, thanks!

James

This revision is now accepted and ready to land.Sep 5 2016, 6:35 AM
This revision was automatically updated to reflect the committed changes.