llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.11k stars 12.01k forks source link

[WinEH] optimizing functions can cause assertions when writing obj or asm #26447

Closed llvmbot closed 8 years ago

llvmbot commented 8 years ago
Bugzilla Link 26073
Resolution FIXED
Resolved on Jan 08, 2016 12:55
Version trunk
OS Windows NT
Attachments IR generated by the D compiler that causes assert in llc after opt -O3
Reporter LLVM Bugzilla Contributor
CC @majnemer

Extended Description

Here's another one: The attached IR builds fine with llc.

If you run "opt -O3" on it first, compiling the output with llc to an object or assembly file produces:

Assertion failed: !KeyInfoT::isEqual(Val, EmptyKey) && !KeyInfoT::isEqual(Val, T ombstoneKey) && "Empty/Tombstone value shouldn't be inserted into map!", file C: \s\d\ldc\llvm\include\llvm/ADT/DenseMap.h, line 484

llvmbot commented 8 years ago

Are you referring to the unreachable code issue?

Yes. I have already changed the cleanup to catch-all-rethrow locally, which also allowed to remove some ugly hacks necessary to convince the runtime not to terminate when throwing inside the cleanup. This new code has some other issues which are not related to the codegen, but I think I have a solution for these, too.

991901f3-cc14-4404-b340-165691b62a58 commented 8 years ago

Fixed in r257182.

Cool! The D test suite passes now with optimizations enabled (but 2 tests that need exceptions during cleanup). Thanks a lot.

Are you referring to the unreachable code issue?

llvmbot commented 8 years ago

Fixed in r257182.

Cool! The D test suite passes now with optimizations enabled (but 2 tests that need exceptions during cleanup). Thanks a lot.

991901f3-cc14-4404-b340-165691b62a58 commented 8 years ago

Fixed in r257182.