summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/call.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+300
| | | | | | | | The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
* Temporarily Revert "Add basic loop fusion pass."Eric Christopher2019-04-171-300/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [InstCombine] Add test to remove VarArg casts (NFC)Florian Hahn2018-01-031-0/+11
| | | | llvm-svn: 321706
* Don't remove side effecting instructions due to ConstantFoldInstructionDavid Majnemer2016-07-221-0/+11
| | | | | | | | | Just because we can constant fold the result of an instruction does not imply that we can delete the instruction. It may have side effects. This fixes PR28655. llvm-svn: 276389
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-171-2/+2
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* [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
* Cleanup handling of constant function casts.Matt Arsenault2013-09-171-1/+142
| | | | | | | | | | Some of this code is no longer necessary since int<->ptr casts are no longer occur as of r187444. This also fixes handling vectors of pointers, and adds a bunch of new testcases for vectors and address spaces. llvm-svn: 190885
* Change behavior of calling bitcasted alias functions.Matt Arsenault2013-07-301-38/+39
| | | | | | | | It will now only convert the arguments / return value and call the underlying function if the types are able to be bitcasted. This avoids using fp<->int conversions that would occur before. llvm-svn: 187444
* Update Transforms tests to use CHECK-LABEL for easier debugging. No ↵Stephen Lin2013-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | functionality change. This update was done with the following bash script: find test/Transforms -name "*.ll" | \ while read NAME; do echo "$NAME" if ! grep -q "^; *RUN: *llc" $NAME; then TEMP=`mktemp -t temp` cp $NAME $TEMP sed -n "s/^define [^@]*@\([A-Za-z0-9_]*\)(.*$/\1/p" < $NAME | \ while read FUNC; do sed -i '' "s/;\(.*\)\([A-Za-z0-9_]*\):\( *\)@$FUNC\([( ]*\)\$/;\1\2-LABEL:\3@$FUNC(/g" $TEMP done mv $TEMP $NAME fi done llvm-svn: 186268
* Revert "Disable InstCombine unsafe folding bitcasts of calls w/ varargs."Jim Grosbach2012-02-031-0/+14
| | | | | | This reverts commit d0e277d272d517ca1cda368267d199f0da7cad95. llvm-svn: 149647
* Disable InstCombine unsafe folding bitcasts of calls w/ varargs.Jim Grosbach2012-02-011-14/+0
| | | | | | | | | | | Changing arguments from being passed as fixed to varargs is unsafe, as the ABI may require they be handled differently (stack vs. register, for example). Remove two tests which rely on the bitcast being folded into the direct call, which is exactly the transformation that's unsafe. llvm-svn: 149457
* Stop emitting instructions with the name "tmp" they eat up memory and have ↵Benjamin Kramer2011-09-271-8/+8
| | | | | | | | to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
* Update to new EH scheme.Bill Wendling2011-09-011-0/+4
| | | | llvm-svn: 138933
* Start trying to make InstCombine preserve more debug info. The idea here is ↵Eli Friedman2011-05-181-4/+4
| | | | | | | | | | to set the debug location on the IRBuilder, which will be then right location in most cases. This should magically give many transformations debug locations, and fixing places which are missing a debug location will usually just means changing the code creating it to use the IRBuilder. As an example, the change to InstCombineCalls catches a common case where a call to a bitcast of a function is rewritten. Chris, does this approach look reasonable? llvm-svn: 131516
* change instcombine to not turn a call to non-varargs bitcast ofChris Lattner2011-02-241-1/+15
| | | | | | | | | function prototype into a call to a varargs prototype. We do allow the xform if we have a definition, but otherwise we don't want to risk that we're changing the abi in a subtle way. On X86-64, for example, varargs require passing stuff in %al. llvm-svn: 126363
* Remove arm_apcscc from the test files. It is the default and doing thisRafael Espindola2010-06-171-2/+2
| | | | | | matches what llvm-gcc and clang now produce. llvm-svn: 106221
* fix rdar://7590304, a miscompilation of objc apps on arm. The callerChris Lattner2010-02-011-1/+21
| | | | | | | | | of objc message send was getting marked arm_apcscc, but the prototype isn't. This is fine at runtime because objcmsgsend is implemented in assembly. Only turn a mismatched caller and callee into 'unreachable' if the callee is a definition. llvm-svn: 94986
* Make opt default to not adding a target data string and update tests that ↵Kenneth Uildriks2009-11-031-0/+1
| | | | | | depend on target data to supply it within the test llvm-svn: 85900
* Missing CHECK: lines makes test exit abnormally.Edward O'Callaghan2009-10-121-2/+2
| | | | llvm-svn: 83835
* FileCheck not CheckFile, oops.Edward O'Callaghan2009-10-121-1/+1
| | | | llvm-svn: 83834
* Convert InstCombine/call.ll to CheckFile.Edward O'Callaghan2009-10-121-3/+22
| | | | llvm-svn: 83833
* Change tests from "opt %s" to "opt < %s" so that opt doesn't see theDan Gohman2009-09-111-1/+1
| | | | | | | | input filename so that opt doesn't print the input filename in the output so that grep lines in the tests don't unintentionally match strings in the input filename. llvm-svn: 81537
* Use opt -S instead of piping bitcode output through llvm-dis.Dan Gohman2009-09-081-1/+1
| | | | llvm-svn: 81257
* Change these tests to feed the assembly files to opt directly, insteadDan Gohman2009-09-081-1/+1
| | | | | | of using llvm-as, now that opt supports this. llvm-svn: 81226
* Don't depend on Tcl behavior of redirecting stderr for all commands in aDaniel Dunbar2009-09-071-1/+1
| | | | | | pipeline. llvm-svn: 81153
* Ignore stderr for some more tests that expect warnings there.Matthijs Kooijman2008-06-101-1/+2
| | | | | | This fixes 2 testcases. llvm-svn: 52184
* Byebye llvm-upgrade!Tanya Lattner2008-03-251-27/+46
| | | | llvm-svn: 48762
* For PR1319:Reid Spencer2007-04-151-0/+1
| | | | | | | Make use of the END. facility on all files > 1K so that we aren't wasting CPU cycles searching for RUN: lines that we'll never find. llvm-svn: 36059
* For PR1319:Reid Spencer2007-04-141-1/+2
| | | | | | Upgrade tests to work with new llvm.exp version of llvm_runtest. llvm-svn: 36013
* Regression is gone, don't try to find it on clean target.Reid Spencer2007-01-171-0/+56
llvm-svn: 33296
OpenPOWER on IntegriCloud