summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/fcopysign.ll
Commit message (Collapse)AuthorAgeFilesLines
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the call instruction See r230786 and r230794 for similar changes to gep and load respectively. Call is a bit different because it often doesn't have a single explicit type - usually the type is deduced from the arguments, and just the return type is explicit. In those cases there's no need to change the IR. When that's not the case, the IR usually contains the pointer type of the first operand - but since typed pointers are going away, that representation is insufficient so I'm just stripping the "pointerness" of the explicit type away. This does make the IR a bit weird - it /sort of/ reads like the type of the first operand: "call void () %x(" but %x is actually of type "void ()*" and will eventually be just of type "ptr". But this seems not too bad and I don't think it would benefit from repeating the type ("void (), void () * %x(" and then eventually "void (), ptr %x(") as has been done with gep and load. This also has a side benefit: since the explicit type is no longer a pointer, there's no ambiguity between an explicit type and a function that returns a function pointer. Previously this case needed an explicit type (eg: a function returning a void() function was written as "call void () () * @x(" rather than "call void () * @x(" because of the ambiguity between a function returning a pointer to a void() function and a function returning void). No ambiguity means even function pointer return types can just be written alone, without writing the whole function's type. This leaves /only/ the varargs case where the explicit type is required. Given the special type syntax in call instructions, the regex-fu used for migration was a bit more involved in its own unique way (as every one of these is) so here it is. Use it in conjunction with the apply.sh script and associated find/xargs commands I've provided in rr230786 to migrate your out of tree tests. Do let me know if any of this doesn't cover your cases & we can iterate on a more general script/regexes to help others with out of tree tests. About 9 test cases couldn't be automatically migrated - half of those were functions returning function pointers, where I just had to manually delete the function argument types now that we didn't need an explicit function type there. The other half were typedefs of function types used in calls - just had to manually drop the * from those. import fileinput import sys import re pat = re.compile(r'((?:=|:|^|\s)call\s(?:[^@]*?))(\s*$|\s*(?:(?:\[\[[a-zA-Z0-9_]+\]\]|[@%](?:(")?[\\\?@a-zA-Z0-9_.]*?(?(3)"|)|{{.*}}))(?:\(|$)|undef|inttoptr|bitcast|null|asm).*$)') addrspace_end = re.compile(r"addrspace\(\d+\)\s*\*$") func_end = re.compile("(?:void.*|\)\s*)\*$") def conv(match, line): if not match or re.search(addrspace_end, match.group(1)) or not re.search(func_end, match.group(1)): return line return line[:match.start()] + match.group(1)[:match.group(1).rfind('*')].rstrip() + match.group(2) + line[match.end():] for line in sys.stdin: sys.stdout.write(conv(re.search(pat, line), line)) llvm-svn: 235145
* Convert CodeGen/*/*.ll tests to use the new CHECK-LABEL for easier ↵Stephen Lin2013-07-131-6/+6
| | | | | | | | | | debugging. No functionality change and all tests pass after conversion. This was done with the following sed invocation to catch label lines demarking function boundaries: sed -i '' "s/^;\( *\)\([A-Z0-9_]*\):\( *\)test\([A-Za-z0-9_-]*\):\( *\)$/;\1\2-LABEL:\3test\4:\5/g" test/CodeGen/*/*.ll which was written conservatively to avoid false positives rather than false negatives. I scanned through all the changes and everything looks correct. llvm-svn: 186258
* Refactor and check "onlyReadsMemory" before optimizing builtins.Bob Wilson2012-08-031-3/+3
| | | | | | | | | This patch is mostly just refactoring a bunch of copy-and-pasted code, but it also adds a check that the call instructions are readnone or readonly. That check was already present for sin, cos, sqrt, log2, and exp2 calls, but it was missing for the rest of the builtins being handled in this code. llvm-svn: 161282
* Move the constant-folding support for FP_ROUND in SelectionDAG from the ↵Owen Anderson2012-04-101-18/+2
| | | | | | | | one-operand version of getNode() to the two-operand version, since it became a two-operand node at sound point. Zap a testcase that this allows us to completely fold away. llvm-svn: 154447
* Make tests less sensitive to scheduling changes.Jakob Stoklund Olesen2012-02-231-3/+3
| | | | llvm-svn: 151260
* Fix a bunch of ARM tests to be register allocation independent.Jakob Stoklund Olesen2011-05-031-1/+1
| | | | llvm-svn: 130800
* Tighten test case a bit.Jakob Stoklund Olesen2011-04-191-1/+2
| | | | | | | Ideally, we would match an S-register to its containing D-register, but that requires arithmetic (divide by 2). llvm-svn: 129756
* Make tests register allocation independent again.Jakob Stoklund Olesen2011-04-191-2/+2
| | | | llvm-svn: 129739
* Fix another fcopysign lowering bug. If src is f64 and destination is f32, don'tEvan Cheng2011-04-151-4/+21
| | | | | | forget to right shift the source by 32 first. rdar://9287902 llvm-svn: 129556
* Fix typo introduced by r126661: "Fix a typo which ..."Jakob Stoklund Olesen2011-02-281-1/+1
| | | | llvm-svn: 126666
* Fix a typo which cause dag combine crash. rdar://9059537.Evan Cheng2011-02-281-0/+14
| | | | llvm-svn: 126661
* More fcopysign correctness and performance fix.Evan Cheng2011-02-231-9/+8
| | | | | | | | | | | | | The previous codegen for the slow path (when values are in VFP / NEON registers) was incorrect if the source is NaN. The new codegen uses NEON vbsl instruction to copy the sign bit. e.g. vmov.i32 d1, #0x80000000 vbsl d1, d2, d0 If NEON is not available, it uses integer instructions to copy the sign bit. rdar://9034702 llvm-svn: 126295
* Fix buggy fcopysign lowering.Evan Cheng2011-02-111-13/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This define float @foo(float %x, float %y) nounwind readnone { entry: %0 = tail call float @copysignf(float %x, float %y) nounwind readnone ret float %0 } Was compiled to: vmov s0, r1 bic r0, r0, #-2147483648 vmov s1, r0 vcmpe.f32 s0, #0 vmrs apsr_nzcv, fpscr it lt vneglt.f32 s1, s1 vmov r0, s1 bx lr This fails to copy the sign of -0.0f because it's lost during the float to int conversion. Also, it's sub-optimal when the inputs are in GPR registers. Now it uses integer and + or operations when it's profitable. And it's correct! lsrs r1, r1, #31 bfi r0, r1, #31, #1 bx lr rdar://8984306 llvm-svn: 125357
* Use Unified Assembly Syntax for the ARM backend.Jim Grosbach2009-11-091-1/+1
| | | | llvm-svn: 86494
* Eliminate more uses of llvm-as and llvm-dis.Dan Gohman2009-09-091-2/+2
| | | | llvm-svn: 81293
* Convert tests using "| wc -l | grep ..." to use the count script.Dan Gohman2007-08-151-2/+2
| | | | llvm-svn: 41097
* For PR1319:Reid Spencer2007-04-161-4/+3
| | | | | | | | Remove && from the end of the lines to prevent tests from throwing run lines into the background. Also, clean up places where the same command is run multiple times by using a temporary file. llvm-svn: 36142
* For PR411:Reid Spencer2007-01-301-2/+2
| | | | | | | | Update these tests to not use the same name even though the type of the value differs. After PR411 hits, type planes will be gone and it will be illegal for a name to be used twice, regardless of type. llvm-svn: 33660
* For PR761:Reid Spencer2007-01-261-5/+5
| | | | | | | | | | | | | | Remove "target endian/pointersize" or add "target datalayout" to make the test parse properly or set the datalayout because defaults changes. For PR645: Make global names use the @ prefix. For llvm-upgrade changes: Fix test cases or completely remove use of llvm-upgrade for test cases that cannot survive the new renaming or upgrade capabilities. llvm-svn: 33533
* fix fcopysign testLauro Ramos Venancio2007-01-251-4/+4
| | | | llvm-svn: 33503
* ARM test cases contributed by Apple.Evan Cheng2007-01-191-17/+15
| | | | llvm-svn: 33354
* Regression is gone, don't try to find it on clean target.Reid Spencer2007-01-171-0/+21
llvm-svn: 33296
OpenPOWER on IntegriCloud