diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2018-04-12 15:27:01 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2018-04-12 15:27:01 +0000 |
| commit | 5ace2b765a54e2fc7e546a60d83e97c36db05507 (patch) | |
| tree | 4f8b32edd62a77248ec5bf14485b7271c541908f /llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll | |
| parent | 01cbd5aa686b7b50cf5b099c8a37b6ac2cfd05df (diff) | |
| download | bcm5719-llvm-5ace2b765a54e2fc7e546a60d83e97c36db05507.tar.gz bcm5719-llvm-5ace2b765a54e2fc7e546a60d83e97c36db05507.zip | |
revert r328921 - [DAGCombine] (float)((int) f) --> ftrunc (PR36617)
This change is exposing UB in source code - as was warned/predicted. :)
See D44909 for discussion. Reverting while we figure out how to fix things.
llvm-svn: 329920
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll')
| -rw-r--r-- | llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll b/llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll index 0bbaf3493fd..713adb4dfd0 100644 --- a/llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll +++ b/llvm/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll @@ -36,7 +36,11 @@ entry: ret float %conv1 ; CHECK-LABEL: @foo -; CHECK: friz 1, 1 +; CHECK-DAG: fctiwz [[REG2:[0-9]+]], 1 +; CHECK-DAG: addi [[REG1:[0-9]+]], 1, +; CHECK: stfiwx [[REG2]], 0, [[REG1]] +; CHECK: lfiwax [[REG3:[0-9]+]], 0, [[REG1]] +; CHECK: fcfids 1, [[REG3]] ; CHECK: blr } @@ -48,7 +52,11 @@ entry: ret double %conv1 ; CHECK-LABEL: @food -; CHECK: friz 1, 1 +; CHECK-DAG: fctiwz [[REG2:[0-9]+]], 1 +; CHECK-DAG: addi [[REG1:[0-9]+]], 1, +; CHECK: stfiwx [[REG2]], 0, [[REG1]] +; CHECK: lfiwax [[REG3:[0-9]+]], 0, [[REG1]] +; CHECK: fcfid 1, [[REG3]] ; CHECK: blr } @@ -60,7 +68,11 @@ entry: ret float %conv1 ; CHECK-LABEL: @foou -; CHECK: friz 1, 1 +; CHECK-DAG: fctiwuz [[REG2:[0-9]+]], 1 +; CHECK-DAG: addi [[REG1:[0-9]+]], 1, +; CHECK: stfiwx [[REG2]], 0, [[REG1]] +; CHECK: lfiwzx [[REG3:[0-9]+]], 0, [[REG1]] +; CHECK: fcfidus 1, [[REG3]] ; CHECK: blr } @@ -72,7 +84,11 @@ entry: ret double %conv1 ; CHECK-LABEL: @fooud -; CHECK: friz 1, 1 +; CHECK-DAG: fctiwuz [[REG2:[0-9]+]], 1 +; CHECK-DAG: addi [[REG1:[0-9]+]], 1, +; CHECK: stfiwx [[REG2]], 0, [[REG1]] +; CHECK: lfiwzx [[REG3:[0-9]+]], 0, [[REG1]] +; CHECK: fcfidu 1, [[REG3]] ; CHECK: blr } |

