This is an archive of the discontinued LLVM Phabricator instance.

Don't loop unswitch vector selects
ClosedPublic

Authored by vchuravy on Apr 30 2023, 3:27 PM.

Details

Summary

Otherwise we could produce br <2x i1> which are of course not legal.

Branch condition is not 'i1' type!
  br <2 x i1> %cond.fr1, label %entry.split.us, label %entry.split
  %cond.fr1 = freeze <2 x i1> %cond
LLVM ERROR: Broken module found, compilation aborted!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/vchuravy/builds/llvm/bin/opt -passes=simple-loop-unswitch<nontrivial> -S

Fixes change introduced by https://reviews.llvm.org/D138526

Diff Detail

Event Timeline

vchuravy created this revision.Apr 30 2023, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2023, 3:27 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
vchuravy requested review of this revision.Apr 30 2023, 3:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2023, 3:27 PM
vchuravy edited the summary of this revision. (Show Details)Apr 30 2023, 3:27 PM
vchuravy added a project: Restricted Project.
caojoshua accepted this revision.Apr 30 2023, 3:34 PM

lgtm. didn't know selects can have this.

This revision is now accepted and ready to land.Apr 30 2023, 3:34 PM
This revision was landed with ongoing or failed builds.Apr 30 2023, 4:21 PM
This revision was automatically updated to reflect the committed changes.