platform/upstream/llvm.git
7 years agoAdd hack to allow test to run w/o C++17 copy elision
Eric Fiselier [Sun, 28 May 2017 20:30:18 +0000 (20:30 +0000)]
Add hack to allow test to run w/o C++17 copy elision

llvm-svn: 304103

7 years agoRemove XFAIL's for recently fixed bug
Eric Fiselier [Sun, 28 May 2017 20:25:41 +0000 (20:25 +0000)]
Remove XFAIL's for recently fixed bug

llvm-svn: 304102

7 years ago[coroutines] Add end-to-end tests within libc++
Eric Fiselier [Sun, 28 May 2017 19:38:21 +0000 (19:38 +0000)]
[coroutines] Add end-to-end tests within libc++

This patch adds end-to-end/breathing tests for coroutines
into libc++. The tests aren't specifically to test libc++ requirements
but instead are intented to ensure coroutines are working fine in general.

Although libc++ isn't exactly the most correct place for these tests
to live, there is one major advantage. The libc++ test suite is also
used by MSVC and by adding the tests here it ensures they will be
run against all currently available coroutine implementations.

llvm-svn: 304101

7 years ago[TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC
Craig Topper [Sun, 28 May 2017 18:24:43 +0000 (18:24 +0000)]
[TableGen][X86] Use CHAR_BIT with sizeof instead of hardcoded 8. NFC

llvm-svn: 304100

7 years ago[TableGen][X86] Mark a couple global tables as const. NFC
Craig Topper [Sun, 28 May 2017 18:24:41 +0000 (18:24 +0000)]
[TableGen][X86] Mark a couple global tables as const. NFC

llvm-svn: 304099

7 years ago[TableGen][X86] Improve formatting of the fold table output by indenting the body...
Craig Topper [Sun, 28 May 2017 18:24:39 +0000 (18:24 +0000)]
[TableGen][X86] Improve formatting of the fold table output by indenting the body of the table and adding blank lines between tables. NFC

llvm-svn: 304098

7 years ago[TableGen][X86] Add an llvm_unreachable to a switch so we get an error if we need...
Craig Topper [Sun, 28 May 2017 18:24:37 +0000 (18:24 +0000)]
[TableGen][X86] Add an llvm_unreachable to a switch so we get an error if we need expansion in the future.

llvm-svn: 304097

7 years ago[TableGen][X86] Remove unnecessary std::string creations. NFC
Craig Topper [Sun, 28 May 2017 18:24:35 +0000 (18:24 +0000)]
[TableGen][X86] Remove unnecessary std::string creations. NFC

llvm-svn: 304096

7 years ago[TableGen][X86] Replace a global std::vector with a regular array. llvm::find works...
Craig Topper [Sun, 28 May 2017 18:24:32 +0000 (18:24 +0000)]
[TableGen][X86] Replace a global std::vector with a regular array. llvm::find works on arrays, just need to use std::end to check the result.

llvm-svn: 304095

7 years ago[coroutines] Diagnose invalid result types for `await_resume` and `await_suspend...
Eric Fiselier [Sun, 28 May 2017 18:21:12 +0000 (18:21 +0000)]
[coroutines] Diagnose invalid result  types for `await_resume` and `await_suspend` and add missing conversions.

Summary:
The expression `await_ready` is required to be contextually convertible to bool and `await_suspend` must be a prvalue of either `void` or `bool`.
This patch adds diagnostics for when those requirements are violated.

It also correctly performs the contextual conversion to bool on the result of `await_ready`

Reviewers: GorNishanov, rsmith

Reviewed By: GorNishanov

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33625

llvm-svn: 304094

7 years ago[TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it...
Craig Topper [Sun, 28 May 2017 17:48:41 +0000 (17:48 +0000)]
[TableGen][X86] getValueAsString returns a std::string not a StringRef. Capture it that way to avoid a StringRef to a temporary.

llvm-svn: 304093

7 years ago[coroutines] www/cxx_status.html: add non-breaking hyphen
Gor Nishanov [Sun, 28 May 2017 17:35:23 +0000 (17:35 +0000)]
[coroutines] www/cxx_status.html: add non-breaking hyphen

Reviewers: GorNishanov

Reviewed By: GorNishanov

Subscribers: EricWF, rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D33632

llvm-svn: 304092

7 years ago[coroutines] www/cxx_status.html: add non-breaking hyphen
Gor Nishanov [Sun, 28 May 2017 16:25:31 +0000 (16:25 +0000)]
[coroutines] www/cxx_status.html: add non-breaking hyphen

Reviewers: GorNishanov

Reviewed By: GorNishanov

Subscribers: EricWF, rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D33632

llvm-svn: 304091

7 years ago[x86] auto-generate better checks; NFC
Sanjay Patel [Sun, 28 May 2017 13:57:59 +0000 (13:57 +0000)]
[x86] auto-generate better checks; NFC

llvm-svn: 304090

7 years ago[InstrProf] Use more ArrayRef/StringRef.
Benjamin Kramer [Sun, 28 May 2017 13:23:02 +0000 (13:23 +0000)]
[InstrProf] Use more ArrayRef/StringRef.

No functional change intended.

llvm-svn: 304089

7 years ago[X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding...
Ayman Musa [Sun, 28 May 2017 12:55:36 +0000 (12:55 +0000)]
[X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables.

X86 backend holds huge tables in order to map between the register and memory forms of each instruction.
This TableGen Backend automatically generated all these tables with the appropriate flags for each entry.

Differential Revision: https://reviews.llvm.org/D32684

llvm-svn: 304088

7 years ago[X86] Adding FoldGenRegForm helper field (for memory folding tables tableGen backend...
Ayman Musa [Sun, 28 May 2017 12:39:37 +0000 (12:39 +0000)]
[X86] Adding FoldGenRegForm helper field (for memory folding tables tableGen backend) to X86Inst class and set its value for the relevant instructions.

Some register-register instructions can be encoded in 2 different ways, this happens when 2 register operands can be folded (separately).
For example if we look at the MOV8rr and MOV8rr_REV, both instructions perform exactly the same operation, but are encoded differently. Here is the relevant information about these instructions from Intel's 64-ia-32-architectures-software-developer-manual:

Opcode  Instruction  Op/En  64-Bit Mode  Compat/Leg Mode  Description
8A /r   MOV r8,r/m8  RM     Valid        Valid            Move r/m8 to r8.
88 /r   MOV r/m8,r8  MR     Valid        Valid            Move r8 to r/m8.
Here we can see that in order to enable the folding of the output and input registers, we had to define 2 "encodings", and as a result we got 2 move 8-bit register-register instructions.

In the X86 backend, we define both of these instructions, usually one has a regular name (MOV8rr) while the other has "_REV" suffix (MOV8rr_REV), must be marked with isCodeGenOnly flag and is not emitted from CodeGen.

Automatically generating the memory folding tables relies on matching encodings of instructions, but in these cases where we want to map both memory forms of the mov 8-bit (MOV8rm & MOV8mr) to MOV8rr (not to MOV8rr_REV) we have to somehow point from the MOV8rr_REV to the "regular" appropriate instruction which in this case is MOV8rr.

This field enable this "pointing" mechanism - which is used in the TableGen backend for generating memory folding tables.

Differential Revision: https://reviews.llvm.org/D32683

llvm-svn: 304087

7 years ago[X86] Fixing VPOPCNTDQ feature set lookup.
Oren Ben Simhon [Sun, 28 May 2017 11:26:11 +0000 (11:26 +0000)]
[X86] Fixing VPOPCNTDQ feature set lookup.

llvm-svn: 304086

7 years agobaremetal.cpp: Fix tests where lib suffix is 64
Ismail Donmez [Sun, 28 May 2017 06:15:42 +0000 (06:15 +0000)]
baremetal.cpp: Fix tests where lib suffix is 64

llvm-svn: 304085

7 years agoReverted r304083 as it seems there is a desire to address this in the googletest.
Galina Kistanova [Sun, 28 May 2017 05:50:22 +0000 (05:50 +0000)]
Reverted r304083 as it seems there is a desire to address this in the googletest.

llvm-svn: 304084

7 years agoAdded braces to address gcc warning: suggest explicit braces to avoid ambiguous ...
Galina Kistanova [Sun, 28 May 2017 03:50:52 +0000 (03:50 +0000)]
Added braces to address gcc warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]. NFC.

llvm-svn: 304083

7 years agoClangdTests.cpp: Use "clang/Config/config.h" instead of "llvm/Config/config.h".
NAKAMURA Takumi [Sat, 27 May 2017 23:19:28 +0000 (23:19 +0000)]
ClangdTests.cpp: Use "clang/Config/config.h" instead of "llvm/Config/config.h".

llvm-svn: 304082

7 years ago[coroutines] Mark cxx_status.html of Coroutines TS as (SVN)
Gor Nishanov [Sat, 27 May 2017 22:54:52 +0000 (22:54 +0000)]
[coroutines] Mark cxx_status.html of Coroutines TS as (SVN)

Summary: It is time!

Reviewers: GorNishanov, rsmith

Reviewed By: GorNishanov, rsmith

Subscribers: EricWF, rsmith, cfe-commits

Differential Revision: https://reviews.llvm.org/D33624

llvm-svn: 304081

7 years agoDebugInfo: Add source code/build instructions for split-dwarf-dwp symbolizer test
David Blaikie [Sat, 27 May 2017 19:52:20 +0000 (19:52 +0000)]
DebugInfo: Add source code/build instructions for split-dwarf-dwp symbolizer test

Addressing post-commit code review feedback from Paul Robinson on
r303609.

llvm-svn: 304080

7 years agoCloning: Fix debug info cloning
Gor Nishanov [Sat, 27 May 2017 19:41:09 +0000 (19:41 +0000)]
Cloning: Fix debug info cloning

Summary:
I believe https://reviews.llvm.org/rL302576 introduced two bugs:

1) it produces duplicate distinct variables for every: dbg.value describing the same variable.
    To fix the problme I switched form getDistinct() to get() in DebugLoc.cpp: auto reparentVar = [&](DILocalVariable *Var) {
    return DILocalVariable::getDistinct(

2) It passes NewFunction plain name as a linkagename parameter to Subprogram constructor. Breaks assert in:

 || DeclLinkageName.empty()) || LinkageName == DeclLinkageName) && "decl has a linkage name and it is different"' failed.
#9 0x00007f5010261b75 llvm::DwarfUnit::applySubprogramDefinitionAttributes(llvm::DISubprogram const*, llvm::DIE&) /home/gor/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1173:3
#
(Edit: reproducer added)

Here how https://reviews.llvm.org/rL302576 broke coroutine debug info.
Coroutine body of the original function is split into several parts by cloning and removing unneeded code.
All parts describe the original function and variables present in the original function.

For a simple case, prior to Split, original function has these two blocks:

```
PostSpill:                                        ; preds = %AllocaSpillBB
  call void @llvm.dbg.value(metadata i32 %x, i64 0, metadata !14, metadata !15), !dbg !13
  store i32 %x, i32* %x.addr, align 4
  ...
and

sw.epilog:                                        ; preds = %sw.bb
  %x.addr.reload.addr = getelementptr inbounds %f.Frame, %f.Frame* %FramePtr, i32 0, i32 4, !dbg !20
  %4 = load i32, i32* %x.addr.reload.addr, align 4, !dbg !20
  call void @llvm.dbg.value(metadata i32 %4, i64 0, metadata !14, metadata !15), !dbg !13

!14 = !DILocalVariable(name: "x", arg: 1, scope: !6, file: !7, line: 55, type: !11)

```

Note that in two blocks different expression represent the same original user variable X.

Before rL302576, for every cloned function there was exactly one cloned DILocalVariable(name: "x" as in:

```
define i8* @f(i32 %x) #0 !dbg !6 {
  ...
!6 = distinct !DISubprogram(name: "f", scope: !7, file: !7, line: 55, type: !8, isLocal: false, isDefinition: true, scopeLine: 55, flags: DIFlagPrototyped,
...
!14 = !DILocalVariable(name: "x", arg: 1, scope: !6, file: !7, line: 55, type: !11)

define internal fastcc void @f.resume(%f.Frame* %FramePtr) #0 !dbg !25 {
...
!25 = distinct !DISubprogram(name: "f", scope: !7, file: !7, line: 55, type: !8, isLocal: false, isDefinition: true, scopeLine: 55, flags: DIFlagPrototyped, isOptimized: false, unit: !0, variables: !2)
!28 = !DILocalVariable(name: "x", arg: 1, scope: !25, file: !7, line: 55, type: !11)
```
After rL302576, for every cloned function there were as many DILocalVariable(name: "x" as there were "call void @llvm.dbg.value" for that variable.
This was causing asserts in VerifyDebugInfo and AssemblyPrinter.

Example:

```
!27 = distinct !DISubprogram(name: "f", linkageName: "f.resume", scope: !7, file: !7, line: 55, type: !8, isLocal: false, isDefinition: true, scopeLine: 55,
!29 = distinct !DILocalVariable(name: "x", arg: 1, scope: !27, file: !7, line: 55, type: !11)
!39 = distinct !DILocalVariable(name: "x", arg: 1, scope: !27, file: !7, line: 55, type: !11)
!41 = distinct !DILocalVariable(name: "x", arg: 1, scope: !27, file: !7, line: 55, type: !11)
```

Second problem:

Prior to rL302576, all clones were described by DISubprogram referring to original function.

```
define i8* @f(i32 %x) #0 !dbg !6 {
...
!6 = distinct !DISubprogram(name: "f", scope: !7, file: !7, line: 55, type: !8, isLocal: false, isDefinition: true, scopeLine: 55, flags: DIFlagPrototyped,

define internal fastcc void @f.resume(%f.Frame* %FramePtr) #0 !dbg !25 {
...
!25 = distinct !DISubprogram(name: "f", scope: !7, file: !7, line: 55, type: !8, isLocal: false, isDefinition: true, scopeLine: 55, flags: DIFlagPrototyped,
```

After rL302576, DISubprogram for clones is of two minds, plain name refers to the original name, linkageName refers to plain name of the clone.

```
!27 = distinct !DISubprogram(name: "f", linkageName: "f.resume", scope: !7, file: !7, line: 55, type: !8, isLocal: false, isDefinition: true, scopeLine: 55,
```

I think the assumption in AsmPrinter is that both name and linkageName should refer to the same entity. It asserts here when they are not:

```
 || DeclLinkageName.empty()) || LinkageName == DeclLinkageName) && "decl has a linkage name and it is different"' failed.
#9 0x00007f5010261b75 llvm::DwarfUnit::applySubprogramDefinitionAttributes(llvm::DISubprogram const*, llvm::DIE&) /home/gor/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1173:3
```
After this fix, behavior (with respect to coroutines) reverts to exactly as it was before and therefore making them debuggable again, or even more importantly, compilable, with "-g"

Reviewers: dblaikie, echristo, aprantl

Reviewed By: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33614

llvm-svn: 304079

7 years agoRecommit "[DWARF] - Make collectAddressRanges() return section index in addition...
George Rimar [Sat, 27 May 2017 18:10:23 +0000 (18:10 +0000)]
Recommit "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"

With fix of uninitialized variable.

Original commit message:

This change is intended to use for LLD in D33183.
Problem we have in LLD when building .gdb_index is that we need to know section which address range belongs to.

Previously it was solved on LLD side by providing fake section addresses with use of llvm::LoadedObjectInfo
interface. We assigned file offsets as addressed. Then after obtaining ranges lists, for each range we had to find section ID's.
That not only was slow, but also complicated implementation and was the reason of incorrect behavior when
sections share the same offsets, like D33176 shows.

This patch makes DWARF parsers to return section index as well. That solves problem mentioned above.

Differential revision: https://reviews.llvm.org/D33184

llvm-svn: 304078

7 years ago[TableGen] Prevent DagInit from leaking its Args and ArgNames when they exceed the...
Craig Topper [Sat, 27 May 2017 17:36:50 +0000 (17:36 +0000)]
[TableGen] Prevent DagInit from leaking its Args and ArgNames when they exceed the size of the SmallVector.

DagInits are allocated in a BumpPtrAllocator so they are never destructed. This means the destructor for the SmallVector never runs.

To fix this we now allocate the vectors in the BumpPtrAllocator too using TrailingObjects.

llvm-svn: 304077

7 years ago[TableGen] Use the correct type for the first template for the ListInit TrailingObjects.
Craig Topper [Sat, 27 May 2017 17:36:47 +0000 (17:36 +0000)]
[TableGen] Use the correct type for the first template for the ListInit TrailingObjects.

llvm-svn: 304076

7 years agoDelinearize memory accesses that reference parameters coming from function calls
Tobias Grosser [Sat, 27 May 2017 15:18:53 +0000 (15:18 +0000)]
Delinearize memory accesses that reference parameters coming from function calls

Certain affine memory accesses which we model today might contain products of
parameters which we might combined into a new parameter to be able to create an
affine expression that represents these memory accesses. Especially in the
context of OpenCL, this approach looses information as memory accesses such as
A[get_global_id(0) * N + get_global_id(1)] are assumed to be linear. We
correctly recover their multi-dimensional structure by assuming that parameters
that are the result of a function call at IR level likely are not parameters,
but indeed induction variables. The resulting access is now
A[get_global_id(0)][get_global_id(1)] for an array A[][N].

llvm-svn: 304075

7 years agoAllow side-effect free function calls in valid affine SCEVs
Tobias Grosser [Sat, 27 May 2017 15:18:46 +0000 (15:18 +0000)]
Allow side-effect free function calls in valid affine SCEVs

Side-effect free function calls with only constant parameters can be easily
re-generated and consequently do not prevent us from modeling a SCEV. This
change allows array subscripts to reference function calls such as
'get_global_id()' as used in OpenCL.

We use the function name plus the constant operands to name the parameter. This
is possible as the function name is required and is not dropped in release
builds the same way names of llvm::Values are dropped. We also provide more
readable names for common OpenCL functions, to make it easy to understand the
polyhedral model we generate.

llvm-svn: 304074

7 years ago[SCEV] Assume parameters coming from function calls contain IVs
Tobias Grosser [Sat, 27 May 2017 15:17:49 +0000 (15:17 +0000)]
[SCEV] Assume parameters coming from function calls contain IVs

The optimistic delinearization implemented in LLVM detects array sizes by
looking for non-linear products between parameters and induction variables.
In OpenCL code, such products often look like:

  A[get_global_id(0) * N + get_global_id(1)]

Hence, the IV is hidden in the get_global_id() call and consequently
delinearization would fail as no induction variable is available that helps
us to identify N as array size parameter.

We now use a very simple heuristic to change this. We assume that each parameter
that comes directly from a function call is a hidden induction variable. As
a result, we can delinearize the access above to:

  A[get_global_id(0)][get_global_id(1]

llvm-svn: 304073

7 years ago[DAGCombiner] use narrow load to avoid vector extract
Sanjay Patel [Sat, 27 May 2017 14:07:03 +0000 (14:07 +0000)]
[DAGCombiner] use narrow load to avoid vector extract

If we have (extract_subvector(load wide vector)) with no other users,
that can just be (load narrow vector). This is intentionally conservative.
Follow-ups may loosen the one-use constraint to account for the extract cost
or just remove the one-use check.

The memop chain updating is based on code that already exists multiple times
in x86 lowering, so that should be pulled into a helper function as a follow-up.

Background: this is a potential improvement noticed via regressions caused by
making x86's peekThroughBitcasts() not loop on consecutive bitcasts (see
comments in D33137).

Differential Revision: https://reviews.llvm.org/D33578

llvm-svn: 304072

7 years agoUpdate some tests to changes in isl's internal representation
Tobias Grosser [Sat, 27 May 2017 11:33:05 +0000 (11:33 +0000)]
Update some tests to changes in isl's internal representation

This was forgotten as part of r304069.

llvm-svn: 304070

7 years agoUpdate isl to isl-0.18-662-g17e172e
Tobias Grosser [Sat, 27 May 2017 11:09:39 +0000 (11:09 +0000)]
Update isl to isl-0.18-662-g17e172e

This is a general maintenance update

llvm-svn: 304069

7 years agoUpdate information on isl C++ bindings in Polly release notes
Tobias Grosser [Sat, 27 May 2017 11:01:01 +0000 (11:01 +0000)]
Update information on isl C++ bindings in Polly release notes

llvm-svn: 304068

7 years agoClangdTests.cpp: Fix a possible typo, it was "if (TmpDir2 != TmpDir2)"
NAKAMURA Takumi [Sat, 27 May 2017 08:06:52 +0000 (08:06 +0000)]
ClangdTests.cpp: Fix a possible typo, it was "if (TmpDir2 != TmpDir2)"

It caused failures in unittests if TmpDir2 is not "/tmp" .

llvm-svn: 304067

7 years ago[TableGen] Remove all the static vectors named TheActualPool.
Craig Topper [Sat, 27 May 2017 06:14:12 +0000 (06:14 +0000)]
[TableGen] Remove all the static vectors named TheActualPool.

These used to hold std::unique_ptrs that managed the allocation for the various *Init object so that they would be deleted on exit. Everything is allocated in a BumpPtrAllocator name so there is no reason for these to still exist.

llvm-svn: 304066

7 years ago[coroutines] Define getPassName() for coroutine passes
Gor Nishanov [Sat, 27 May 2017 05:54:30 +0000 (05:54 +0000)]
[coroutines] Define getPassName() for coroutine passes

Reviewers: GorNishanov

Reviewed By: GorNishanov

Subscribers: EricWF, llvm-commits

Differential Revision: https://reviews.llvm.org/D33622

llvm-svn: 304065

7 years ago[PartialInlining] Replace delete with unique_ptr in computeCallsiteToProfCountMap
Vitaly Buka [Sat, 27 May 2017 05:32:09 +0000 (05:32 +0000)]
[PartialInlining] Replace delete with unique_ptr in computeCallsiteToProfCountMap

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: vsk, llvm-commits

Differential Revision: https://reviews.llvm.org/D33220

llvm-svn: 304064

7 years agoScalarEvolution unit test: fix typo that breaks check-all
Gor Nishanov [Sat, 27 May 2017 05:24:30 +0000 (05:24 +0000)]
ScalarEvolution unit test: fix typo that breaks check-all

llvm-svn: 304063

7 years ago[Polly] Added the list of Instructions to output in ScopInfo pass
Tobias Grosser [Sat, 27 May 2017 04:40:18 +0000 (04:40 +0000)]
[Polly] Added the list of Instructions to output in ScopInfo pass

Summary: This patch outputs all the list of instructions in BlockStmts.

Reviewers: Meinersbur, grosser, bollu

Subscribers: bollu, llvm-commits, pollydev

Differential Revision: https://reviews.llvm.org/D33163

llvm-svn: 304062

7 years agoRearrange Dom unittest to accommodate multiple tests
Adam Nemet [Sat, 27 May 2017 04:05:52 +0000 (04:05 +0000)]
Rearrange Dom unittest to accommodate multiple tests

I've taken the approach from the LoopInfo test:

* Rather than running in the pass manager just build the analyses manually
* Split out the common parts (makeLLVMModule, runWithDomTree) into helpers

Differential Revision: https://reviews.llvm.org/D33617

llvm-svn: 304061

7 years agoclang-format DomTree unittest
Adam Nemet [Sat, 27 May 2017 04:05:50 +0000 (04:05 +0000)]
clang-format DomTree unittest

llvm-svn: 304060

7 years agoAArch64/PEI: Do not add reserved regs to liveins
Matthias Braun [Sat, 27 May 2017 03:38:02 +0000 (03:38 +0000)]
AArch64/PEI: Do not add reserved regs to liveins

We do not track liveness for reserved registers. It is unnecessary to
add them to block livein lists.

llvm-svn: 304059

7 years ago[SCEVExpander] Try harder to avoid introducing inttoptr
Keno Fischer [Sat, 27 May 2017 03:22:55 +0000 (03:22 +0000)]
[SCEVExpander] Try harder to avoid introducing inttoptr

Summary:
This fixes introduction of an incorrect inttoptr/ptrtoint pair in
the included test case which makes use of non-integral pointers. I
suspect there are more cases like this left, but this takes care of
the one I was seeing at the moment.

Reviewers: sanjoy

Subscribers: mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D33129

llvm-svn: 304058

7 years agoRevert "[coroutines] Support "coroutines" feature in module map requires clause"
Eric Fiselier [Sat, 27 May 2017 03:04:51 +0000 (03:04 +0000)]
Revert "[coroutines] Support "coroutines" feature in module map requires clause"

This reverts commit r304054.

llvm-svn: 304057

7 years ago[OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple...
George Rokos [Sat, 27 May 2017 03:03:13 +0000 (03:03 +0000)]
[OpenMP] Create COMDAT group for OpenMP offload registration code to avoid multiple copies

Thanks to Sergey Dmitriev for submitting the patch.

Differential Revision: https://reviews.llvm.org/D33509

llvm-svn: 304056

7 years agoScheduleDAGInstrs: Fix fixupKills()
Matthias Braun [Sat, 27 May 2017 02:50:50 +0000 (02:50 +0000)]
ScheduleDAGInstrs: Fix fixupKills()

Rewrite fixupKills() to use the LivePhysRegs class. Simplifies the code
and fixes a bug where the CSR registers in return blocks where missed
leading to invalid kill flags. Also remove the unnecessary rule that we
wouldn't set kill flags on tied operands.

No tests as I have an upcoming commit improving MachineVerifier checks
to catch these cases in multiple existing lit tests.

llvm-svn: 304055

7 years ago[coroutines] Support "coroutines" feature in module map requires clause
Eric Fiselier [Sat, 27 May 2017 02:46:17 +0000 (02:46 +0000)]
[coroutines] Support "coroutines" feature in module map requires clause

Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D33538

llvm-svn: 304054

7 years ago[Demangler] copy changes made in libcxxabi's r303718 to ItaniumDemangle
Erik Pilkington [Sat, 27 May 2017 01:48:34 +0000 (01:48 +0000)]
[Demangler] copy changes made in libcxxabi's r303718 to ItaniumDemangle

llvm-svn: 304053

7 years ago[AArch64][GlobalISel] Add the Localizer pass for the O0 pipeline
Quentin Colombet [Sat, 27 May 2017 01:34:07 +0000 (01:34 +0000)]
[AArch64][GlobalISel] Add the Localizer pass for the O0 pipeline

This should fix most of the issue we have right now with constants being
spilled all over the place.

llvm-svn: 304052

7 years ago[GlobalISel] Add a localizer pass for target to use
Quentin Colombet [Sat, 27 May 2017 01:34:00 +0000 (01:34 +0000)]
[GlobalISel] Add a localizer pass for target to use

This reverts commit r299287 plus clean-ups.

The localizer pass is a helper pass that could be run at O0 in the GISel
pipeline to work around the deficiency of the fast register allocator.
It basically shortens the live-ranges of the constants so that the
allocator does not spill all over the place.

Long term fix would be to make the greedy allocator fast.

llvm-svn: 304051

7 years ago[GVN] Recommit the patch "Add phi-translate support in scalarpre".
Wei Mi [Sat, 27 May 2017 00:54:19 +0000 (00:54 +0000)]
[GVN] Recommit the patch "Add phi-translate support in scalarpre".

The recommit is to fix a bug about ExtractValue and InsertValue ops. For those
ops, some varargs inside GVN::Expression are not value numbers but raw index
numbers. It is wrong to do phi-translate for raw index numbers, and the fix is
to stop doing that.

Right now scalarpre doesn't have phi-translate support, so it will miss some
simple pre opportunities. Like the following testcase, current scalarpre cannot
recognize the last "a * b" is fully redundent because a and b used by the last
"a * b" expr are both defined by phis.

long a[100], b[100], g1, g2, g3;
__attribute__((pure)) long goo();

void foo(long a, long b, long c, long d) {
  g1 = a * b;
  if (__builtin_expect(g2 > 3, 0)) {
    a = c;
    b = d;
    g2 = a * b;
  }
  g3 = a * b;      // fully redundant.
}
The patch adds phi-translate support in scalarpre. This is only a temporary
solution before the newpre based on newgvn is available.

Differential Revision: https://reviews.llvm.org/D32252

llvm-svn: 304050

7 years agoBranchRelaxation: computeLiveIns() after creating new block
Matthias Braun [Sat, 27 May 2017 00:53:48 +0000 (00:53 +0000)]
BranchRelaxation: computeLiveIns() after creating new block

One case in BranchRelaxation did not compute liveins after creating a
new block. This is catched by existing tests with an upcoming commit
that will improve MachineVerifier checking of livein lists.

llvm-svn: 304049

7 years agoAArch64: Fix cmpxchg O0 expansion
Matthias Braun [Fri, 26 May 2017 23:48:59 +0000 (23:48 +0000)]
AArch64: Fix cmpxchg O0 expansion

- Rewrite livein calculation to use the computeLiveIns() helper
  function. This is slightly less efficient but easier to reason about
  and doesn't unnecessarily add pristine and reserved registers[1]
- Zero the status register at the beginning of the loop to make sure it
  has a defined value.
- Remove kill flags of values that need to stay alive throughout the loop.

[1] An upcoming commit of mine will tighten the MachineVerifier to catch
    these.

llvm-svn: 304048

7 years ago[llvm-pdbdump] pdb2yaml: add an -all option to dump everything we can
Bob Haarman [Fri, 26 May 2017 23:46:20 +0000 (23:46 +0000)]
[llvm-pdbdump] pdb2yaml: add an -all option to dump everything we can

Reviewers: amccarth, rnk, zturner

Reviewed By: zturner

Subscribers: fhahn, llvm-commits

Differential Revision: https://reviews.llvm.org/D33613

llvm-svn: 304047

7 years agoBitcode: Remove some dead code. Spotted by Teresa.
Peter Collingbourne [Fri, 26 May 2017 23:21:40 +0000 (23:21 +0000)]
Bitcode: Remove some dead code. Spotted by Teresa.

Differential Revision: https://reviews.llvm.org/D33609

llvm-svn: 304046

7 years ago[asan] Enable back halt_on_error-torture.cc disabled on PowerPC.
Alex Shlyapnikov [Fri, 26 May 2017 23:14:06 +0000 (23:14 +0000)]
[asan] Enable back halt_on_error-torture.cc disabled on PowerPC.

Summary:
D33521 addressed a memory ordering issue in BlockingMutex, which seems
to be the cause of a flakiness of a few ASan tests on PowerPC.

Reviewers: eugenis

Subscribers: kubamracek, nemanjai, llvm-commits

Differential Revision: https://reviews.llvm.org/D33611

llvm-svn: 304045

7 years ago[InstSimplify] Push commuted op checks for and/or of icmp further down to avoid dupli...
Craig Topper [Fri, 26 May 2017 22:42:34 +0000 (22:42 +0000)]
[InstSimplify] Push commuted op checks for and/or of icmp further down to avoid duplicate work

Previously, we called simplifyPossiblyCastedAndOrOfICmps twice with the operands commuted, but the call to simplifyAndOrOfICmpsWithConstants further down already handles commuting and doesn't need to be called both ways.

This patch pushes double calls further down to just the individual routines that need to be called twice.

Differential Revision: https://reviews.llvm.org/D33603

llvm-svn: 304044

7 years ago[bpf] disallow global_addr+off folding
Alexei Starovoitov [Fri, 26 May 2017 22:32:41 +0000 (22:32 +0000)]
[bpf] disallow global_addr+off folding

Wrong assembly code is generated for a simple program with
clang. If clang only produces IR and llc is used
for IR lowering and optimization, correct assembly
code is generated.

The main reason is that clang feeds default Reloc::Static
to llvm and llc feeds no RelocMode to llvm, where
for llc case, BPF backend picks up Reloc::PIC_ mode.
This leads different IR lowering behavior and clang
permits global_addr+off folding while llc doesn't.

This patch introduces isOffsetFoldingLegal function into
BPF backend and the function always return false.
This will make clang and llc behave the same for
the lowering.

Bug https://bugs.llvm.org//show_bug.cgi?id=33183
has more detailed explanation.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
llvm-svn: 304043

7 years agoFix test broken by r304020
David Blaikie [Fri, 26 May 2017 22:11:18 +0000 (22:11 +0000)]
Fix test broken by r304020

It's a workaround because the test was flakey passing to begin with, but
it looks like (going off commit history) it really did want to test in
the presence of debug info, so keep that behavior (by adding something
to the CU so it's not dropped) & restore the flakey pass in the process.
(added a FIXME in case someone else decides to look at it later)

llvm-svn: 304042

7 years ago[Mips] Placate GCC's -Wmisleading-indentation. NFCI.
Davide Italiano [Fri, 26 May 2017 21:56:19 +0000 (21:56 +0000)]
[Mips] Placate GCC's -Wmisleading-indentation. NFCI.

llvm-svn: 304041

7 years ago[lib/LTO] Don't reinvent the code for switching linkage.
Davide Italiano [Fri, 26 May 2017 21:56:14 +0000 (21:56 +0000)]
[lib/LTO] Don't reinvent the code for switching linkage.

Differential Revision:  https://reviews.llvm.org/D33582

llvm-svn: 304040

7 years ago[compiler-rt] Don't reset non-default user handler if allow_user_segv_handler is...
Vitaly Buka [Fri, 26 May 2017 21:51:26 +0000 (21:51 +0000)]
[compiler-rt] Don't reset non-default user handler if allow_user_segv_handler is true.

Reviewers: eugenis, kcc

Subscribers: kubamracek, llvm-commits

Differential Revision: https://reviews.llvm.org/D32457

llvm-svn: 304039

7 years agoLivePhysRegs: Rework constructor + documentation; NFC
Matthias Braun [Fri, 26 May 2017 21:51:00 +0000 (21:51 +0000)]
LivePhysRegs: Rework constructor + documentation; NFC

- Take reference instead of pointer to a TRI that cannot be nullptr.
- Improve documentation comments.

llvm-svn: 304038

7 years agoLivePhysRegs: Doxygen cleanup; NFC
Matthias Braun [Fri, 26 May 2017 21:50:54 +0000 (21:50 +0000)]
LivePhysRegs: Doxygen cleanup; NFC

- Remove unnecessary \brief
- @p -> \p
- Add \file and /// to introduction

llvm-svn: 304037

7 years agoLivePhysRegs: Add default for removeRegsInMask(Clobbers); NFC
Matthias Braun [Fri, 26 May 2017 21:50:51 +0000 (21:50 +0000)]
LivePhysRegs: Add default for removeRegsInMask(Clobbers); NFC

llvm-svn: 304036

7 years agoMachineVerifier: Remove unused set; NFC
Matthias Braun [Fri, 26 May 2017 21:50:48 +0000 (21:50 +0000)]
MachineVerifier: Remove unused set; NFC

llvm-svn: 304035

7 years ago[Hexagon] Cleanup of unused function isCalleeSaveReg (NFC)
Sumanth Gundapaneni [Fri, 26 May 2017 21:09:54 +0000 (21:09 +0000)]
[Hexagon] Cleanup of unused function isCalleeSaveReg (NFC)

llvm-svn: 304034

7 years agoResubmit r303861.
Konstantin Zhuravlyov [Fri, 26 May 2017 21:08:20 +0000 (21:08 +0000)]
Resubmit r303861.

[AMDGPU] add __builtin_amdgcn_s_getpc

Patch by Tim Corringham

llvm-svn: 304033

7 years agoallow_user_segv_handler was already removed
Vitaly Buka [Fri, 26 May 2017 20:50:49 +0000 (20:50 +0000)]
allow_user_segv_handler was already removed

New default behavior matches previous allow_user_segv_handler=1

llvm-svn: 304032

7 years agoResubmit r303859 with test fixed.
Konstantin Zhuravlyov [Fri, 26 May 2017 20:38:26 +0000 (20:38 +0000)]
Resubmit r303859 with test fixed.

[AMDGPU] add intrinsic for s_getpc

Summary: The s_getpc instruction is exposed as intrinsic llvm.amdgcn.s.getpc.

Patch by Tim Corringham

llvm-svn: 304031

7 years agoRemove unused diagnostics. NFC.
Benjamin Kramer [Fri, 26 May 2017 20:14:12 +0000 (20:14 +0000)]
Remove unused diagnostics. NFC.

llvm-svn: 304030

7 years agoMake helper functions static. NFC.
Benjamin Kramer [Fri, 26 May 2017 20:09:00 +0000 (20:09 +0000)]
Make helper functions static. NFC.

llvm-svn: 304029

7 years agoMake helper functions static. NFC.
Benjamin Kramer [Fri, 26 May 2017 20:08:24 +0000 (20:08 +0000)]
Make helper functions static. NFC.

llvm-svn: 304028

7 years agoFix the ManagedStatic list ordering when using DynamicLibrary::addPermanentLibrary.
Frederich Munch [Fri, 26 May 2017 19:43:23 +0000 (19:43 +0000)]
Fix the ManagedStatic list ordering when using DynamicLibrary::addPermanentLibrary.

Summary:
r295737 included a fix for leaking libraries loaded via. DynamicLibrary::addPermanentLibrary.
This created a problem where static constructors in a library could insert llvm::ManagedStatic objects before DynamicLibrary would register it's own ManagedStatic, meaning a crash could occur at shutdown.

r301562 exasperated this problem by cleaning up the DynamicLibrary ManagedStatic during llvm_shutdown.

Reviewers: v.g.vassilev, lhames, efriedma

Reviewed By: efriedma

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D33581

llvm-svn: 304027

7 years ago[libcxxabi] iconv is not needed for mingw-w64
Martell Malone [Fri, 26 May 2017 19:39:39 +0000 (19:39 +0000)]
[libcxxabi] iconv is not needed for mingw-w64

llvm-svn: 304026

7 years ago[scan-build] Patch to scan-build tool to support "--target=<value>" flag
Petr Hosek [Fri, 26 May 2017 19:25:32 +0000 (19:25 +0000)]
[scan-build] Patch to scan-build tool to support "--target=<value>" flag

The scan-build script provided by clang can be used to detect defects in
code in the compile time. However, we discovered that the
"--target=<value>" flag in clang is not properly handled by this script,
which results in failures when analyzing projects that have used this
flag in their makefile.

This single line of change allows scan-build script to properly handle
the "--target=<value>" flag.

Patch by Haowei Wu

Differential Revision: https://reviews.llvm.org/D33263

llvm-svn: 304025

7 years ago[lld][ELF]Add option to make .dynamic read only
Petr Hosek [Fri, 26 May 2017 19:12:38 +0000 (19:12 +0000)]
[lld][ELF]Add option to make .dynamic read only

The .dynamic section of an ELF almost doesn't need to be written to with
the exception of the DT_DEBUG entry. For several reasons having a read
only .dynamic section would be useful. This change adds the -z keyword
"rodynamic" which forces .dynamic to be read-only. In this case DT_DEBUG
will not be emited.

Patch by Jake Ehrlich

Differential Revision: https://reviews.llvm.org/D33251

llvm-svn: 304024

7 years ago[InstSimplify] Move a variable declaration to make simplifyAndOfICmps look more like...
Craig Topper [Fri, 26 May 2017 19:04:02 +0000 (19:04 +0000)]
[InstSimplify] Move a variable declaration to make simplifyAndOfICmps look more like simplifyOrOfICmps. NFC

llvm-svn: 304023

7 years ago[InstSimplify] Use commutable matchers to shorten some code
Craig Topper [Fri, 26 May 2017 19:03:59 +0000 (19:03 +0000)]
[InstSimplify] Use commutable matchers to shorten some code

This code was replicated two additional times to handle commuted cases, but I think a commutable matcher can take care of it.

Differential Revision: https://reviews.llvm.org/D33585

llvm-svn: 304022

7 years ago[InstSimplify] Use m_APInt instead of m_ConstantInt in ((V + N) & C1) | (V & C2)...
Craig Topper [Fri, 26 May 2017 19:03:53 +0000 (19:03 +0000)]
[InstSimplify] Use m_APInt instead of m_ConstantInt in ((V + N) & C1) | (V & C2) handling in order to support splat vectors.

The tests here are have operands commuted to provide more coverage. I also commuted one of the instructions in the scalar tests so the 4 tests cover the 4 commuted variations

Differential Revision: https://reviews.llvm.org/D33599

llvm-svn: 304021

7 years agoDebugInfo: Do not emit empty CUs
David Blaikie [Fri, 26 May 2017 18:52:56 +0000 (18:52 +0000)]
DebugInfo: Do not emit empty CUs

Consistent with GCC and addresses a shortcoming with ThinLTO where many
imported CUs may end up being empty (because the functions imported from
them either ended up not being used (and were then discarded, since
they're imported as available_externally) or optimized away entirely).

Test cases previously testing empty CUs (either intentionally, or
because they didn't need anything more complicated) had a trivial 'int'
or similar basic type added to their retained types list.

This is a first order approximation - a deeper implementation could do
things like:

1) Be more lazy about construction of the CU - for example if two CUs
containing a single identical retained type are linked together, with
this change one of the two CUs will be produced but empty (since a
duplicate type won't be produced).

2) Go further and invert all the CU links the same way the subprogram
link is inverted - keep named CU lists of retained types, macros, etc,
and have those link back to the CU. Then if they're emitted, the CU is
emitted, but never otherwise - this would allow the metadata itself to
be dropped earlier too, though it seems unlikely that's an important
optimization as there shouldn't be many CUs relative to the number of
other entities.

llvm-svn: 304020

7 years agoPMB: Run the whole-program-devirt pass during LTO at --lto-O0.
Peter Collingbourne [Fri, 26 May 2017 18:27:13 +0000 (18:27 +0000)]
PMB: Run the whole-program-devirt pass during LTO at --lto-O0.

The whole-program-devirt pass needs to run at -O0 because only it
knows about the llvm.type.checked.load intrinsic: it needs to both
lower the intrinsic itself and handle it in the summary.

Differential Revision: https://reviews.llvm.org/D33571

llvm-svn: 304019

7 years ago[InstCombine] Pass the DominatorTree, AssumptionCache, and context instruction to...
Craig Topper [Fri, 26 May 2017 18:23:57 +0000 (18:23 +0000)]
[InstCombine] Pass the DominatorTree, AssumptionCache, and context instruction to a few calls to isKnownPositive, isKnownNegative, and isKnownNonZero

Every other place in InstCombine that uses these methods in ValueTracking already pass this information. This makes the remaining sites consistent.

Differential Revision: https://reviews.llvm.org/D33567

llvm-svn: 304018

7 years agoCodeGen: Define Swift's legal vector types for AArch64, ARM
Arnold Schwaighofer [Fri, 26 May 2017 18:11:54 +0000 (18:11 +0000)]
CodeGen: Define Swift's legal vector types for AArch64, ARM

rdar://32401301

llvm-svn: 304017

7 years ago[ELF] - Attemp to fix bot
George Rimar [Fri, 26 May 2017 18:07:25 +0000 (18:07 +0000)]
[ELF] - Attemp to fix bot

http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/8549/steps/build_Lld/logs/stdio

llvm-svn: 304016

7 years ago[AMDGPU][MC][GFX9] Corrected encoding of flat_scratch* for SDWA opcodes
Dmitry Preobrazhensky [Fri, 26 May 2017 18:01:29 +0000 (18:01 +0000)]
[AMDGPU][MC][GFX9] Corrected encoding of flat_scratch* for SDWA opcodes

See bug 33171: https://bugs.llvm.org/show_bug.cgi?id=33171

Reviewers: Sam Kolton

Differential Revision: https://reviews.llvm.org/D33553

llvm-svn: 304015

7 years agoAvoid a couple uses of OutputSections.
Rafael Espindola [Fri, 26 May 2017 17:48:27 +0000 (17:48 +0000)]
Avoid a couple uses of OutputSections.

After fabricateDefaultCommands we can look at the script commands.

llvm-svn: 304014

7 years agoOnly define __SIZEOF_FLOAT128__ on x86 as intended in r304012
Reid Kleckner [Fri, 26 May 2017 17:48:01 +0000 (17:48 +0000)]
Only define __SIZEOF_FLOAT128__ on x86 as intended in r304012

GCC only defines it on x86.

llvm-svn: 304013

7 years agoEnable __float128 for mingw for GCC compatibility and define __SIZEOF_FLOAT128__...
Reid Kleckner [Fri, 26 May 2017 17:38:15 +0000 (17:38 +0000)]
Enable __float128 for mingw for GCC compatibility and define __SIZEOF_FLOAT128__ on x86

GCC defines __FLOAT128__ on Power and __SIZEOF_FLOAT128__ on x86. We're
just following the inconsistency for now so users have some way to test.

Effectively merges this patch as requested by Martell Malone:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-clang/0107-enable-__float128-for-X86-MinGW.patch

llvm-svn: 304012

7 years agoRevert r304002 "[DWARF] - Make collectAddressRanges() return section index in additio...
George Rimar [Fri, 26 May 2017 17:36:23 +0000 (17:36 +0000)]
Revert r304002 "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"

Revert it again. Now another bot unhappy: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/8750

llvm-svn: 304011

7 years ago[LSAN-ARM] Marking new test unsupported on ARMHF due to bot failures
Renato Golin [Fri, 26 May 2017 17:31:33 +0000 (17:31 +0000)]
[LSAN-ARM] Marking new test unsupported on ARMHF due to bot failures

The test was meant for Darwin anyway, so I'm not even sure it's supposed
to run on Linux. If it was, then we need time to investigate, but since
the test is new, there's no point in reverting the whole patch because
of it.

llvm-svn: 304010

7 years agoAvoid using EhFrameHdr->Sections.
Rafael Espindola [Fri, 26 May 2017 17:28:17 +0000 (17:28 +0000)]
Avoid using EhFrameHdr->Sections.

This is a necessary step for moving clearOutputSections earlier.

llvm-svn: 304009

7 years agoOrder writable executable sections before writable ones.
Rafael Espindola [Fri, 26 May 2017 17:23:25 +0000 (17:23 +0000)]
Order writable executable sections before writable ones.

On SPARC, .plt is both writeable and executable. The current way
sections are sorted means that lld puts it after .data/.bss. but it
really needs to be close to .test to make sure branches into .plt
don't overflow. I'd argue that because .bss is supposed to come last
on all architectures, we should change the default sort order such
that writable and executable sections come before sections that are
just writeable. read-only executable sections should still come after
sections that are just read-only of course. This diff makes this
change.

llvm-svn: 304008

7 years ago[ScopInfo] Translate mapToDimension to isl C++ [NFC]
Tobias Grosser [Fri, 26 May 2017 17:22:03 +0000 (17:22 +0000)]
[ScopInfo] Translate mapToDimension to isl C++ [NFC]

llvm-svn: 304007

7 years agoUpdate MS mangling EBNF, NFC
Reid Kleckner [Fri, 26 May 2017 17:11:10 +0000 (17:11 +0000)]
Update MS mangling EBNF, NFC

llvm-svn: 304006

7 years agoRevert "Export the required symbol from DynamicLibraryTests"
Roger Ferrer Ibanez [Fri, 26 May 2017 17:08:49 +0000 (17:08 +0000)]
Revert "Export the required symbol from DynamicLibraryTests"

This breaks sanitizer-x86_64-linux-fast buildbot.

llvm-svn: 304005

7 years agoDebugInfo: Don't include locations for debug-having code inlined into nodebug functions
David Blaikie [Fri, 26 May 2017 17:05:15 +0000 (17:05 +0000)]
DebugInfo: Don't include locations for debug-having code inlined into nodebug functions

This produced 'strange' DWARF anyway - the CU would have no ranges (or
at least not a range including the inlined code) nor any subprogram or
inlined_subroutine - yet the line table would have entries for these
instructions.

(this actually becomes more relevant with changes coming after this,
where a CU without any contents will be omitted entirely - so there
would be no line table to put this on anyway)

llvm-svn: 304004

7 years agoAMDGPU/GlobalISel: Mark 32-bit float constants as legal
Tom Stellard [Fri, 26 May 2017 16:40:03 +0000 (16:40 +0000)]
AMDGPU/GlobalISel: Mark 32-bit float constants as legal

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D33212

llvm-svn: 304003