This is an archive of the discontinued LLVM Phabricator instance.

Fix bug 20116 - Miscompilation when devirtualization is aborted due to covariant return types
ClosedPublic

Authored by ABataev on Sep 11 2014, 6:54 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev updated this revision to Diff 13610.Sep 11 2014, 6:54 PM
ABataev retitled this revision from to Fix bug 20116 - Miscompilation when devirtualization is aborted due to covariant return types.
ABataev updated this object.
ABataev edited the test plan for this revision. (Show Details)
ABataev added reviewers: rsmith, hfinkel, doug.gregor.
ABataev added a subscriber: Unknown Object (MLST).
rsmith accepted this revision.Sep 26 2014, 6:40 PM
rsmith edited edge metadata.

LGTM with a more detailed testcase.

test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp
181–184 ↗(On Diff #13610)

Can you tweak this test so that it checks the right argument is passed to the function?

This revision is now accepted and ready to land.Sep 26 2014, 6:40 PM

Richard, Ok, I'll do it

Best regards,

Alexey Bataev

Software Engineer
Intel Compiler Team

27.09.2014 5:40, Richard Smith пишет:

LGTM with a more detailed testcase.

Comment at: test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp:181-184
@@ -180,6 +180,6 @@

// not implemented yet.

+ // CHECK: bitcast

// CHECK: getelementptr
// CHECK-NEXT: %[[FUNC:.*]] = load
  • CHECK-NEXT: bitcast CHECK-NEXT: = call {{.*}} %[[FUNC]] return static_cast<RA*>(x)->f(); ----------------

Can you tweak this test so that it checks the right argument is passed to the function?

http://reviews.llvm.org/D5321

ABataev closed this revision.Sep 29 2014, 3:42 AM
ABataev updated this revision to Diff 14156.

Closed by commit rL218602 (authored by @ABataev).