[mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend
authorDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 6 Oct 2015 15:17:25 +0000 (15:17 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Tue, 6 Oct 2015 15:17:25 +0000 (15:17 +0000)
commit10e044c04269c8fd32e9d3eac12f8ce114a7df58
tree38dad6ec21bce452e7cdef9a9da4b3317feb3549
parentc337c9510393f2152e8cc773ab41d2a6b5d1bf58
[mips][microMIPS] Fix an issue with selecting sqrt instruction in LLVM backend

Summary:
This fixes 7 tests during fast LLVM test-suite run:
* MultiSource/Benchmarks/McCat/18-imp/imp
* MultiSource/Applications/oggenc/oggenc
* MultiSource/Benchmarks/MallocBench/gs/gs
* MultiSource/Benchmarks/MiBench/automotive-susan/automotive-susan
* MultiSource/Benchmarks/VersaBench/beamformer/beamformer
* MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame
* MultiSource/Benchmarks/Bullet/bullet

Error message was in the form of:
fatal error: error in backend: Cannot select: 0x95c3288: f32 = fsqrt 0x95c0190 [ORD=9] [ID=18]
  0x95c0190: f32 = fadd 0x95bef30, 0x95c4d00 [ORD=8] [ID=17]
    0x95bef30: f32 = fmul 0x95c4988, 0x95c4988 [ORD=5] [ID=16]
...

There was problem with selecting sqrt instruction in LLVM backend.

To fix the issue changes are made in TableGen definition for sqrt instruction in MipsInstrFPU.td and new test file sqrt.ll is added to LLVM regression tests.

Patch by Zlatko Buljan

Reviewers: zoran.jovanovic, hvarga, dsanders

Subscribers: llvm-commits, petarj

Differential Revision: http://reviews.llvm.org/D13235

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249416 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsInstrFPU.td
test/CodeGen/Mips/llvm-ir/sqrt.ll [new file with mode: 0644]