LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1335 - -inline crash inlining asm into EH target
Summary: -inline crash inlining asm into EH target
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Transformation Utilities (show other bugs)
Version: 1.9
Hardware: Other Linux
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2007-04-15 14:41 PDT by Duncan Sands
Modified: 2010-02-22 12:49 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments
testcase (777 bytes, application/octet-stream)
2007-04-15 14:42 PDT, Duncan Sands
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Sands 2007-04-15 14:41:30 PDT
The -inline pass creates invalid bytecode from this testcase:

opt -inline hi_res.bc
WARNING: You're attempting to print out a bytecode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bytecode first-hand, you
can force output with the `-f' option.

Cannot take the address of an inline asm!
        invoke void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, 
$1", "==imr,==imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* 
null )
                        to label %.noexc unwind label %cleanup144
Broken module found, compilation aborted!
Comment 1 Duncan Sands 2007-04-15 14:42:08 PDT
Created attachment 782 [details]
testcase
Comment 2 Chris Lattner 2007-04-15 16:40:01 PDT
A winning combination: exceptions AND inline asm! :)

Fixed, patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070409/047684.html

Testcase here: Transforms/Inline/2007-04-15-InlineEH.ll

-Chris