[cfe-commits] r127617 - in /cfe/trunk: lib/CodeGen/CGException.cpp test/CXX/except/except.spec/p9-dynamic.cpp test/CXX/except/except.spec/p9-noexcept.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Mar 15 08:15:05 PDT 2011


On Mar 15, 2011, at 3:50 AM, Sebastian Redl wrote:

> On 15.03.2011 01:04, Jakob Stoklund Olesen wrote:
>> On Mar 14, 2011, at 1:33 PM, Sebastian Redl wrote:
>> 
>>> Author: cornedbee
>>> Date: Mon Mar 14 15:33:20 2011
>>> New Revision: 127617
>>> 
>>> URL: http://llvm.org/viewvc/llvm-project?rev=127617&view=rev
>>> Log:
>>> Code generation for noexcept.
>>> 
>>> Added:
>>>    cfe/trunk/test/CXX/except/except.spec/p9-dynamic.cpp
>>>    cfe/trunk/test/CXX/except/except.spec/p9-noexcept.cpp
>> These tests are failing in a release (-Asserts) build:
> I have practically no experience with CodeGen. Does anyone have any idea why things would be different in Release-Assert?

The -Asserts build omits all value names that aren't strictly necessary. From your p9-dynamic.cpp:

+Asserts:

lpad:                                             ; preds = %entry
  %exn = call i8* @llvm.eh.exception() nounwind
  store i8* %exn, i8** %exn.slot
  %eh.selector = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %exn, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 2, i8* bitcast (i8** @_ZTIi to i8*), i8* null) nounwind
  %ehspec.fails = icmp slt i32 %eh.selector, 0
  br i1 %ehspec.fails, label %ehspec.unexpected, label %cleanup

-Asserts:

; <label>:3                                       ; preds = %0
  %4 = call i8* @llvm.eh.exception() nounwind
  store i8* %4, i8** %1
  %5 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %4, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 2, i8* bitcast (i8** @_ZTIi to i8*), i8* null) nounwind
  %6 = icmp slt i32 %5, 0
  br i1 %6, label %9, label %7

It's tricky to write tests that cover both.

/jakob





More information about the cfe-commits mailing list