Removing terminators will result in invalid IR, making further
reductions pointless. I do not think there is any valid use case where
we actually want to create invalid IR as part of a reduction.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
Add test for PR43798, adjust existing tests that checked that the terminator was actually removed.
Comment Actions
Yes, it should fix the bug.
I missed the tests directory initially, assuming the tests would live under llvm/test/tools/llvm-reduce.. Added tests now.
Comment Actions
Honestly i don't like this, mainly because this could result in valid reduction
deleting *all* instructions, but then yes, it more frequently results in broken IR.
So i think this will do after all. Thanks.
Comment Actions
Thanks for taking a look! Happy to adjust things down the road if it turns out we are now missing any useful reductions.