This is an archive of the discontinued LLVM Phabricator instance.

Fix an ARM CodeGen crash on optnone attribute
Needs ReviewPublic

Authored by tzik on Sep 18 2015, 2:44 PM.

Details

Reviewers
silviu.baranga
Summary

A function with optnone attribute used to cause CodeGen crash on PIC
mode ARM.
This CL fixes it and adds a regression test.

Diff Detail

Repository
rL LLVM

Event Timeline

tzik updated this revision to Diff 35140.Sep 18 2015, 2:44 PM
tzik retitled this revision from to Fix an ARM CodeGen crash on optnone attribute.
tzik updated this object.
tzik added a reviewer: silviu.baranga.
tzik set the repository for this revision to rL LLVM.
sbaranga added inline comments.
lib/Target/ARM/ARMTargetMachine.cpp
367

We need a comment here explaining why we need this even when not using FastISel and why it's ok to do so.

test/CodeGen/ARM/optnone-pic.ll
9

It would be good to use FileCheck here and check for the function label.